rgw: Fix race condition on FIFO client on new head creation#48632
Merged
rgw: Fix race condition on FIFO client on new head creation#48632
Conversation
57e080d to
21f7259
Compare
BBoozmen
reviewed
Oct 27, 2022
21f7259 to
311b68c
Compare
BBoozmen
reviewed
Oct 28, 2022
f7734aa to
287b627
Compare
kchheda3
reviewed
Nov 1, 2022
287b627 to
7d5c6b0
Compare
9b6e2ac to
cfc3bde
Compare
Contributor
|
https://github.com/adamemerson/ceph/blob/wip-57562/src/rgw/cls_fifo_legacy.cc#L691 https://github.com/adamemerson/ceph/blob/wip-57562/src/rgw/cls_fifo_legacy.cc#L696 |
792c27a to
74848f8
Compare
BBoozmen
reviewed
Nov 14, 2022
3f46639 to
f9f0c09
Compare
f9f0c09 to
e20f86b
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
54997c5 to
3297026
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
Fix logic error where disjunction was used instead of conjunction. Fixes: https://tracker.ceph.com/issues/57562 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Part tags make part creation and setting the head non-idempotent, leading to issues where racing RGWs may get confused about the correct tag for a part. (Or worse, potentially have the metadata header hold different value for a part than the part's header.) Consistently only requires that all nodes agree on the number. Fixes: https://tracker.ceph.com/issues/57562 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Except for the version type, where only versions with the same tag are comparable. Fixes: https://tracker.ceph.com/issues/57562 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Since we no longer use tags, journal entries are just an operation and a part number. If an entry being added is already in the journal, skip it. Fixes: https://tracker.ceph.com/issues/57562 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Only increment the version if we make an actual change. Return whether we have changed something or not so the OSD side can skip writing if there's no change. Fixes: https://tracker.ceph.com/issues/57562 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Contributor
Author
|
Someone please review this. It's ready to go in and be backported. |
cbodley
approved these changes
Jan 9, 2023
mattbenjamin
reviewed
Jan 9, 2023
Contributor
mattbenjamin
left a comment
There was a problem hiding this comment.
don't feel expert enough to approve, but lgtm
We don't really need the overhead and complexity of a multimap. Fixes: https://tracker.ceph.com/issues/57562 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
First, make `_prepare_new_head` take the new head part number, so two calls racing from the same push will attempt to create the same head. Also remove the neorados FIFO since it doesn't have all the bug fixes in the legacy version and will be rewritten in terms of `async_compose` anyway. Fixes: https://tracker.ceph.com/issues/57562 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
A racing client may delete the part we're trying to push to. Use `assert_exists()` to check, and re-read metadata if we receive -ENOENT. Fixes: https://tracker.ceph.com/issues/57562 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
smanjara
approved these changes
Jan 10, 2023
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A thorough addressing of races and possible inconsistencies in FIFO code.
Fixes: https://tracker.ceph.com/issues/57562
Signed-off-by: Adam C. Emerson aemerson@redhat.com
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. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows