Skip to content

crimson/os/seastore: introduce with_repeat_trans_intr - #64812

Merged
Matan-B merged 14 commits into
ceph:mainfrom
Matan-B:wip-matanb-crimson-seastore-trans-intr
Aug 12, 2025
Merged

Matan-B merged 14 commits into
ceph:mainfrom
Matan-B:wip-matanb-crimson-seastore-trans-intr

Conversation

@Matan-B

@Matan-B Matan-B commented Aug 4, 2025 •

Copy link
Copy Markdown
Contributor

with_repeat_trans_intr wrapper would allow users to avoid using with_trans_intr together with repeat_eagain.
Introducing this method requires including transaction in the header file of transaction_interruptor in order to use reset_preserve_handle.
We couldn't introduce it in the cc file due to its being a deduced template auto return type.
In order to achieve that, the circular dependency of transaction_interruptor <-> transaction had to be solved.
Which requires moving base_ertr and base_iertr to common definitions instead of declaring them in each user.
The changes are separated to incremental commits that are able to be compiled in each breaking point for easier cr/history.

Note: this will used in #64771 and is taken out of it for easier cr/testing.

Example usage: 72a21b7#diff-e4c24ed06382cbe8ff9ca5c62387891f8d7d82d06e7d1304abbf90f39c384fedR375

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

@Matan-B
Matan-B requested a review from a team as a code owner August 4, 2025 11:24
@Matan-B Matan-B added this to Crimson Aug 4, 2025
@Matan-B Matan-B moved this to Awaits review in Crimson Aug 4, 2025
@Matan-B
Matan-B force-pushed the wip-matanb-crimson-seastore-trans-intr branch from 621f818 to a545e1c Compare August 4, 2025 12:10
@Matan-B Matan-B moved this from Awaits review to Needs QA in Crimson Aug 10, 2025
@Matan-B

Matan-B commented Aug 10, 2025

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@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

da5e195 added transaction_interruptor
but its no longer needed. Revert the relevant changes.

Signed-off-by: Matan Breizman <[email protected]>
Instead of decalring base_ertr and base_iertr in every file or
class that use them -
* Move base_ertr decleration to the common seastore_types header.
  Note: the price for that is including errorator in seastore_types
        though this seems reasonable considering the benefits.
* Move base_iertr to transaction_interruptor where trans_iertr
  is defined.

Signed-off-by: Matan Breizman <[email protected]>
Use the common declarations instead

Signed-off-by: Matan Breizman <[email protected]>
@Matan-B
Matan-B force-pushed the wip-matanb-crimson-seastore-trans-intr branch from a545e1c to bf1d6c6 Compare August 10, 2025 10:56
transaction_interruptor includes transaction and vice verca.
With the previous commits in this PR, we can not drop transaction
from including transaction_interruptor.

* move interrupt_cond_t to transaction_interruptor.

Signed-off-by: Matan Breizman <[email protected]>
With the new design, only transaction_interruptor would include
transaction in order to use its methods (is_conflicted and future
commits)

Signed-off-by: Matan Breizman <[email protected]>
Seems like to logic is moved here:
```
  last_commit = start_seq;

  apply_backref_byseq(t.move_backref_entries(), start_seq);
  commit_backref_entries(std::move(backref_entries), start_seq);
```

Signed-off-by: Matan Breizman <[email protected]>
Most of with_trans_intr use repeat_eagain so it makes sense to introduce
this wrapper and audit exisitng users (future PR).

Note: each repeated iteration should use a fresh txn if we failed
in-flight.

Signed-off-by: Matan Breizman <[email protected]>
@Matan-B
Matan-B force-pushed the wip-matanb-crimson-seastore-trans-intr branch from bf1d6c6 to 22ad727 Compare August 10, 2025 11:42
* txn is now created only once and not in each repeated
  iteration as before, with_repeat_trans_intr will reset the txn
  if needed.

* in order for us to return a seastar::future, we would have to handle
  each and every errorator. Instead, change the return value to
  errorator and let the caller handle the error.

* The lambda which is passed to with_trans_intr returns mkfs_iertr
  since this is an extended version of base_iertr.
  Introduce a mkfs_ertr for the reason above. Future commits would
  unify the new mkfs_ertr with seastore_mkfs_ertr.

Signed-off-by: Matan Breizman <[email protected]>
@Matan-B

Matan-B commented Aug 10, 2025

Copy link
Copy Markdown
Contributor Author

Testing https://shaman.ceph.com/builds/ceph/wip-matanb-crimson-seastore-trans-intr
with the first user included so the test would make sense 5cdbea8
I want to merge this relatively quick since the common seastore types/files will get conflicted with almost every merge.

@Matan-B

Matan-B commented Aug 11, 2025

Copy link
Copy Markdown
Contributor Author

jenkins test api

1 similar comment
@Matan-B

Matan-B commented Aug 11, 2025

Copy link
Copy Markdown
Contributor Author

jenkins test api

@Matan-B

Matan-B commented Aug 11, 2025 •

Copy link
Copy Markdown
Contributor Author

https://pulpito.ceph.com/matan-2025-08-11_10:38:51-crimson-rados-wip-matanb-crimson-seastore-trans-intr-distro-crimson-debug-smithi/

8436748, 8436809 : infra
8436762, 8436764 8436765: No module named 'tasks.ceph' (doesn't seem releated)
8436760: 404

@Matan-B

Matan-B commented Aug 12, 2025

Copy link
Copy Markdown
Contributor Author

jenkins test api

@Matan-B Matan-B moved this from Needs QA to Tested in Crimson Aug 12, 2025
@Matan-B
Matan-B merged commit 7bd5a8e into ceph:main Aug 12, 2025
@Matan-B Matan-B moved this from Tested to Merged (Main) in Crimson Aug 12, 2025
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.

3 participants