Skip to content

rgw/archive: avoid duplicating objects when syncing from multiple zones - #50841

Merged
cbodley merged 1 commit into
ceph:mainfrom
smanjara:fix-duplicate-objects-archive
May 25, 2023
Merged

cbodley merged 1 commit into
ceph:mainfrom
smanjara:fix-duplicate-objects-archive

Conversation

@smanjara

@smanjara smanjara commented Apr 3, 2023

Copy link
Copy Markdown
Contributor

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

Contribution Guidelines

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
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@smanjara
smanjara requested a review from a team as a code owner April 3, 2023 13:59
@github-actions github-actions Bot added the rgw label Apr 3, 2023
@smanjara

smanjara commented Apr 3, 2023

Copy link
Copy Markdown
Contributor Author

this doesn't work yet. not sure what is missing.

@smanjara
smanjara requested a review from cbodley April 3, 2023 18:21
Comment thread src/rgw/driver/rados/rgw_cr_rados.cc Outdated
Comment on lines 744 to 750

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code is shared between normal and archive zones, and confuses src_obj (which is the key we want to fetch from the remote) with the original dest_obj before RGWArchiveDataSyncModule::sync_object() added an instance id

a bucket replication policy could cause us to sync objects from a different src_bucket. for archive zone, we'd still want the get_obj_state() call to follow_olh on the object in the dest_bucket that we're writing to

ultimately i think that RGWAsyncFetchRemoteObj, RGWFetchRemoteObjCR, and RGWObjFetchCR should all take the arguments explicitly as:

                         const rgw_obj& src_obj,
                         const rgw_obj& dest_obj,
                         const rgw_obj& stat_dest_obj,
                         bool stat_follow_olh

this doesn't necessarily need to block your fix, but we should track this issue and fix it later

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for the detailed explanation, @cbodley

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok yes I overlooked the bucket replication policy case. Your proposal makes sense. will open a tracker and follow up with a pr soon.

@cbodley

cbodley commented May 11, 2023

Copy link
Copy Markdown
Contributor

@smanjara did you have further changes that resolved the bucket marker issue? i don't see them here

@smanjara
smanjara force-pushed the fix-duplicate-objects-archive branch from 5d762a8 to 7085791 Compare May 11, 2023 18:06
@smanjara

smanjara commented May 11, 2023 •

Copy link
Copy Markdown
Contributor Author

@cbodley Pushed an update. I guess I should have made a separate commit to tell the difference but this is the line that changed:
7085791#diff-7481fe6c19efcbe41be74e93e71fbc1e83646849199c979a936faf2d83d5a65fR2933

this gives us the missing source bucket marker.

@smanjara

Copy link
Copy Markdown
Contributor Author

@cbodley Pushed an update. I guess I should have made a separate commit to tell the difference but this is the line that changed: 7085791#diff-7481fe6c19efcbe41be74e93e71fbc1e83646849199c979a936faf2d83d5a65fR2933

this gives us the missing source bucket marker.

we could be using sal handle for source obj here but I noticed that you had removed most sal references in your pr f4df0ac
so I have let it be.

@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

@smanjara
smanjara force-pushed the fix-duplicate-objects-archive branch from 7085791 to 74014cf Compare May 16, 2023 19:40
@cbodley

cbodley commented May 25, 2023

Copy link
Copy Markdown
Contributor

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