Skip to content

crimson/os/seastore: LBACursor based LBAManager/TM interfaces and the related ObjectDataHandler refactor - #62513

Merged
Matan-B merged 19 commits into
ceph:mainfrom
xxhdx1985126:wip-seastore-transaction-manager-iterator
Aug 10, 2025
Merged

Matan-B merged 19 commits into
ceph:mainfrom
xxhdx1985126:wip-seastore-transaction-manager-iterator

Conversation

@xxhdx1985126

@xxhdx1985126 xxhdx1985126 commented Mar 26, 2025 •

Copy link
Copy Markdown
Member

This PR is based on #62071

Signed-off-by: Xuehan Xu [email protected]

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@cyx1231st
cyx1231st self-requested a review March 26, 2025 04:07
@cyx1231st cyx1231st moved this to In Progress in Crimson Mar 26, 2025
@xxhdx1985126
xxhdx1985126 force-pushed the wip-seastore-transaction-manager-iterator branch 4 times, most recently from 0c22570 to f9996da Compare March 28, 2025 01:42
@xxhdx1985126
xxhdx1985126 force-pushed the wip-seastore-transaction-manager-iterator branch from f9996da to 4b4ec15 Compare March 31, 2025 08:53
@xxhdx1985126
xxhdx1985126 force-pushed the wip-seastore-transaction-manager-iterator branch from 4b4ec15 to 9f299d5 Compare March 31, 2025 09:21
@xxhdx1985126
xxhdx1985126 marked this pull request as ready for review March 31, 2025 09:22
@xxhdx1985126
xxhdx1985126 requested a review from a team as a code owner March 31, 2025 09:22
@xxhdx1985126
xxhdx1985126 force-pushed the wip-seastore-transaction-manager-iterator branch 6 times, most recently from 33b9072 to ecb6523 Compare April 4, 2025 12:59
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@xxhdx1985126
xxhdx1985126 force-pushed the wip-seastore-transaction-manager-iterator branch 2 times, most recently from a975d12 to 3b80a36 Compare April 18, 2025 04:56
@xxhdx1985126
xxhdx1985126 force-pushed the wip-seastore-transaction-manager-iterator branch from 3b80a36 to 50e6f3a Compare April 20, 2025 06:02
@xxhdx1985126

Copy link
Copy Markdown
Member Author

I think this is ready to go. @xxhdx1985126 ping me once this is rebased

Thanks, just Rebased:-)

I can run it through teuthology (or you can, if you prefer).

Ok, I'll try to schedule a teuthology run for this:-)

@xxhdx1985126

Copy link
Copy Markdown
Member Author

The following tests FAILED:
209 - unittest_bluefs (SEGFAULT)
210 - unittest_bluefs_ex (Failed)
212 - unittest_bdev (SEGFAULT)

@xxhdx1985126

Copy link
Copy Markdown
Member Author

jenkins test make check

@xxhdx1985126

Copy link
Copy Markdown
Member Author

Just fixed a compiling warning, no need to retest.

@xxhdx1985126

Copy link
Copy Markdown
Member Author

jenkins test api

light-weighted and safe

This commit removes LBAMapping::child_pos, forces TransactioManager
methods to link children directly through child_pos_t, so that
LBAMapping::duplicate() can be a shallow one.

Signed-off-by: Xuehan Xu <[email protected]>
This should avoid unnecessary lba tree searches in the old
implementation of ObjectDataHandler::overwrite()

Overwrites of ObjectDataBlocks are dealt with by first punching holes
in the lba tree and then inserting new extents in the holes.

Specifically, overwrites are classified into two categories:
1. the range of the overwrite falls in a single lba mapping;
2. the range of the overwrite crosses multiple lba mappings.

For the first category, ObjectDataHandler processes the overwrites in
the following way:
1. if the mapping is a pending one (corresponds to a pending extent),
   merge the overwrite with the data of the pending extent;
2. otherwise, if the overwrite can, apply it with delta based
   overwrites;
3. otherwise, punch a hole in the mapping, insert a new extent with the
   data of the overwrite.

For the second category, the overwrite is processed as follows:
1. if the left boundary of the overwrite is inside an existing mapping,
   deal with the mapping in a way similar to the single-mapping
   overwrites;
2. remove all lba mappings that are strictly within the range of the
   overwrite;
3. deal with the right boundary of the overwrite in the same way as the
   left boundary.

Signed-off-by: Xuehan Xu <[email protected]>
Avoiding unnecessary lba tree searches

Signed-off-by: Xuehan Xu <[email protected]>
TransactionManager::remap_pin()

It doesn't have public use cases any more.

Signed-off-by: Xuehan Xu <[email protected]>
state of mappings' child extents

Signed-off-by: Xuehan Xu <[email protected]>
non-zero-reserved mappings

Signed-off-by: Xuehan Xu <[email protected]>
@xxhdx1985126

xxhdx1985126 commented Aug 6, 2025 •

Copy link
Copy Markdown
Member Author

https://pulpito.ceph.com/xuxuehan-2025-08-05_11:19:55-crimson-rados-wip-seastore-transaction-manager-iterator-ci-test-distro-crimson-debug-smithi/

Seems that the only failure was not relevant looking into: https://pulpito.ceph.com/xuxuehan-2025-08-05_11:19:55-crimson-rados-wip-seastore-transaction-manager-iterator-ci-test-distro-crimson-debug-smithi/8425179/

I added three more commits to fix the bugs in this PR:

  1. crimson/os/seastore/lba_mapping: treat indirect mappings as valid non-zero-reserved mappings
  2. crimson/os/seastore/lba_mapping: treat indirect mappings as valid non-clone ones
  3. crimson/os/seastore/transaction_manager: complete indirect mappings before reading

Now the tests seems good, @athanatos could you please take another round of look at this PR? Thanks:-)

@xxhdx1985126

Copy link
Copy Markdown
Member Author

@Matan-B

Matan-B commented Aug 7, 2025

Copy link
Copy Markdown
Contributor

According to its failure "open_collection failed", I think it's not relevant to this PR and this PR should be good to go:-)

Agreed, test failed is "Crimson-objectstore-tool", It is a new test which might be flaky or was broken.

@athanatos

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Merged (Pre Umbrella cutoff)

Development

Successfully merging this pull request may close these issues.

6 participants