rgw: Fix races in initialization of data sync#47566
Closed
adamemerson wants to merge 5 commits intoceph:mainfrom
Closed
rgw: Fix races in initialization of data sync#47566adamemerson wants to merge 5 commits intoceph:mainfrom
adamemerson wants to merge 5 commits intoceph:mainfrom
Conversation
517bbde to
33a11ea
Compare
cbodley
reviewed
Aug 12, 2022
4d64655 to
c468707
Compare
yuvalif
reviewed
Aug 15, 2022
c468707 to
e7e361a
Compare
14 tasks
cbodley
reviewed
Aug 17, 2022
Sticking random #defines everywhere is just atrocious style. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Since we were taking them by reference and copying before, this is strictly better. Callers that give us an RValue can skip the copy. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
RGWDataSyncCR manages the lock instead, holding it through StateInit and StateBuildingFullSyncMaps but releasing it by StateSync. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
If someone else got there first, we won't smash their work. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
The `radosgw-admin data sync init` command does *not* use `cls_version` and just overwrites. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
e7e361a to
eb1be0d
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
smanjara
reviewed
Sep 13, 2022
Contributor
|
anything more to do here? i'd like to get this and #47682 tested/merged |
Contributor
|
included in #48898 |
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.
In a simple, easy process:
RGWInitDataSyncStatusCoroutine. InRGWDataSyncCRhold the lock throughStateInitandStateBuildingFullSyncMaps, but release once we reachStateSync.RGWDataSyncCR.cls_versionfor reads/writes to to global sync status to avoid overwrites. (radosgw-admin data sync initshould overwrite, however.)cls_versionfor reads/writes to per-shard sync status underDataSyncShardCR. (Should probably wait until rgw: Break Full and Incremental sync out into their own classes #47422 merges.)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