rgw: Break Full and Incremental sync out into their own classes#47422
rgw: Break Full and Incremental sync out into their own classes#47422
Conversation
38406d6 to
4056335
Compare
4056335 to
982709d
Compare
|
@cbodley Is there an upstream tracker for this or should I open one? |
@adamemerson if you think this is worth backporting to quincy/pacific, sure |
… of a bucket to error repo instead of triggering a bucket sync on them. Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
… struct. Call remove_cr() to remove full sync obligations after writing all shard entries in to error repo. Replace call() with spawn() and yield_spawn_window() Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
…ndow Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
…cShardCR Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
…class. Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
handle retcodes correctly. Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
…ully. contributed by cbodley Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit b3662cc)
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit b3662cc)
… and construct error repo using datalog_oid_for_error_repo() Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
…ngleEntryCR Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
…lete before spawning shards of next generation Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
982709d to
ff1a38f
Compare
cbodley
left a comment
There was a problem hiding this comment.
fixed some bugs and cleaned up the locking. it's passing multisite tests
|
@adamemerson could you please look over the commits i added? |
adamemerson
left a comment
There was a problem hiding this comment.
@cbodley Looks good to me.
superb! |
The problem: RGWDataSyncShardCR combines full and incremental sync in such a way that yielding in full sync after the transition to incremental (but before all the finishing up is done) can jump straight into incremental. To deal with this break full and incremental sync into their own coroutine classes. For the shared functionality (but /not/ shared data) between them, we have a base class into which parts of the original class are moved. Data that are shared between the two (shard cache, lease) are owned and managed by RGWDataSyncShardCR, with the full and incremental base class getting references. Fixes: https://tracker.ceph.com/issues/57063 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
This function was formerly RGWDataSyncShardCR::full_sync. The only functional difference is that we leave acquiring the lease to the top level RGWDataSyncShardCR coroutine class, since the lease should be held on the transition from full to incremental sync. Fixes: https://tracker.ceph.com/issues/57063 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
This was formerly the function RGWDataSyncShardCR::incremental_sync. As with full_sync, we transfer responsibility for acquiring the lease to the top level RGWDataSyncShardCR coroutine. Fixes: https://tracker.ceph.com/issues/57063 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Rewrite operate() to use reenter and handle lease acquisition at the top level, calling down into the Full and Incremental sync shard coroutines for the actual work. Fixes: https://tracker.ceph.com/issues/57063 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Remove no-longer-used functions and data members they depended on. Fixes: https://tracker.ceph.com/issues/57063 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
moves the lease-related error handling out of DataFull/DataInc and into DataSyncShardCR Signed-off-by: Casey Bodley <cbodley@redhat.com>
771c4a5 to
e26b987
Compare
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
…po on success Signed-off-by: Casey Bodley <cbodley@redhat.com>
e26b987 to
3885261
Compare
|
jenkins test make check |
|
mostly passed qa in https://pulpito.ceph.com/cbodley-2022-08-11_19:52:36-rgw-wip-coroutine-cleaver-distro-default-smithi/, but multisite tests all failed due to #47411 |
|
jenkins test make check |
|
verified manually with multisite tests, only failure was from |
That way we don't end up going down the wrong fork when Full is finishing up.
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