Skip to content

rgw/multisite: pass the data sync status to the shard control coroutine - #72776

Merged
smanjara merged 1 commit into
ceph:mainfrom
lumir-sliva:rgw-data-sync-full-sync-error-repo-timestamp
Nov 12, 2026
Merged

smanjara merged 1 commit into
ceph:mainfrom
lumir-sliva:rgw-data-sync-full-sync-error-repo-timestamp

Conversation

@lumir-sliva

Copy link
Copy Markdown
Contributor

Summary

When a bucket's full sync fails during a data sync full sync, the bucket is dropped for good: failed full sync obligations never reach the error repo. Since 1985a16 (v18.0.0), so reef, squid, tentacle and main.

Problem

  • RGWDataSyncShardControlCR takes the data sync status in its constructor and has a member of the same name, but never initialises it, so RGWDataSyncShardCR and the full sync coroutines get an empty copy.
  • timestamp_for_bucket_shard() finds no marker in it and returns 0 for every bucket shard.
  • RGWDataSyncSingleEntryCR only parks obligations with a timestamp, and the "Write N to error repo" writes in RGWDataFullSyncSingleEntryCR are no-ops (rgw::error_repo::write is a cmp_set_vals GT against 0).
  • The shard goes incremental and removes the full sync index; the bucket only syncs after a later write to it or a bucket sync run.

Fix

Store the status. Full sync obligations then carry their datalog shard's last_update, as 1985a16 intended, and a failed one is retried by the incremental sync's error repo pass like any other failed obligation.

Test

Two zones on one box: data sync init on the secondary, every object sync failing with rgw_sync_data_inject_err_probability=1 until the data sync shards are incremental, then cleared over the admin socket.

main with the fix
objects on the secondary after clearing 0 of 30 after 210 s, 3 of 3 runs 30 of 30 after ~55 s, 3 of 3 runs
error repo nothing written obligation parked with the shard's timestamp, retried once

No multisite suite test: the suite has no fault injection for a full sync failure. The reproducer script is on the tracker.

Fixes: https://tracker.ceph.com/issues/81830

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)

RGWDataSyncShardControlCR takes the data sync status by reference and
never stores it: the member of the same name stays default-constructed,
and that empty copy is what RGWDataSyncShardCR and, through it, the full
sync coroutines get. timestamp_for_bucket_shard() finds no marker in it
and returns a zero timestamp for every bucket shard in full sync, so a
full sync obligation that fails is never written to the error repo
(RGWDataSyncSingleEntryCR only parks obligations with a timestamp), and
the error repo writes RGWDataFullSyncSingleEntryCR makes for the shards
after a failed one are no-ops (rgw::error_repo::write only sets the key
when the new timestamp is greater than the stored one, which is 0 for a
missing key). Store the status, so those entries carry the datalog
shard's last_update as intended. A failed full sync obligation is then
retried by the incremental sync's error repo pass, like any other
failed obligation.

The member was added without being initialised by 1985a16.

Fixes: https://tracker.ceph.com/issues/81830
Signed-off-by: Lumir Sliva <[email protected]>
@lumir-sliva
lumir-sliva requested a review from a team as a code owner October 16, 2026 12:43
@github-actions

Copy link
Copy Markdown

Thank you for your contribution. Since you are not yet a member of the Ceph organization with write permissions on ceph/ceph.git, our CI will not automatically run. Any member of the Ceph organization may label this PR ci-approved to allow Jenkins CI jobs to run.

@anrao19

anrao19 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-anrao4-testing-2026-11-02-0647-main.

@anrao19

anrao19 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-anrao4-testing-2026-11-02-0647-main.

pr testing completed and approved by @ivancich more details on :https://tracker.ceph.com/issues/82521
@lumir-sliva , if no further testing is needed then this pr can be merged

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants