New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luminous: rgw: multisite: object metadata operations are skipped by sync #24056

Merged
merged 11 commits into from Sep 19, 2018

Conversation

Projects
None yet
4 participants
@smithfarm
Contributor

smithfarm commented Sep 12, 2018

cbodley added some commits May 31, 2018

test/rgw: test incremental sync of acls on versioned object
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit b300e14)
rgw: bucket sync doesn't squash over olh entries
all bucket index operations that mutate the olh_epoch must be applied
by sync to keep it consistent between zones. avoid squashing later
operations on the same object version

Fixes: http://tracker.ceph.com/issues/24367

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 08cd49a)
rgw: bucket sync allows OP_ADD on versioned objects
operations like PutACL that only mutate object metadata do not
generate a link_olh entry, so they cannot be skipped. their bilog
entries don't have a versioned_epoch, so we skip the call to
set_olh() by passing an empty value to fetch_remote_obj()

Fixes: http://tracker.ceph.com/issues/24367

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 7fb034e)

Conflicts:
	src/rgw/rgw_data_sync.cc
- trivial resolution

@smithfarm smithfarm self-assigned this Sep 12, 2018

@smithfarm smithfarm added this to the luminous milestone Sep 12, 2018

@smithfarm smithfarm added bug fix core rgw and removed core labels Sep 12, 2018

@smithfarm smithfarm requested a review from cbodley Sep 12, 2018

@smithfarm

This comment has been minimized.

Contributor

smithfarm commented Sep 12, 2018

In file included from /home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_rados.h:26:0,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_user.h:15,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_acl.cc:14:
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_sync_module.h:25:114: error: ‘std::optional’ has not been declared
   virtual RGWCoroutine *sync_object(RGWDataSyncEnv *sync_env, RGWBucketInfo& bucket_info, rgw_obj_key& key, std::optional<uint64_t> versioned_epoch, rgw_zone_set *zones_trace) = 0;
                                                                                                                  ^
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_sync_module.h:25:122: error: expected ‘,’ or ‘...’ before ‘<’ token
   virtual RGWCoroutine *sync_object(RGWDataSyncEnv *sync_env, RGWBucketInfo& bucket_info, rgw_obj_key& key, std::optional<uint64_t> versioned_epoch, rgw_zone_set *zones_trace) = 0;
                                                                                                                          ^
In file included from /home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_user.h:15:0,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_acl.cc:14:
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_rados.h:2824:9: error: ‘optional’ in namespace ‘std’ does not name a type
         std::optional<uint64_t> olh_epoch;
         ^
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_rados.h:3159:29: error: ‘std::optional’ has not been declared
                        std::optional<uint64_t> olh_epoch,
                             ^
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_rados.h:3159:37: error: expected ‘,’ or ‘...’ before ‘<’ token
                        std::optional<uint64_t> olh_epoch,
                                     ^
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_rados.h:4000:3: error: ‘optional’ in namespace ‘std’ does not name a type
   std::optional<uint64_t> olh_epoch;
   ^
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_rados.h: In member function ‘void RGWPutObjProcessor_Atomic::set_olh_epoch(uint64_t)’:
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_rados.h:4045:5: error: ‘olh_epoch’ was not declared in this scope
     olh_epoch = epoch;
     ^
make[3]: *** [src/rgw/CMakeFiles/rgw_a.dir/rgw_acl.cc.o] Error 1
make[2]: *** [src/rgw/CMakeFiles/rgw_a.dir/all] Error 2

@smithfarm smithfarm requested a review from theanalyst Sep 12, 2018

@theanalyst

This comment has been minimized.

Member

theanalyst commented Sep 12, 2018

s/std::optional/boost::optional should mostly do the trick here

cbodley added some commits Jun 1, 2018

rgw: Object::Write::_do_write_meta() takes optional olh epoch
take an optional olh_epoch, and use its empty state to skip set_olh()

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 519f1b4)

Conflicts:
    src/rgw/rgw_rados.h
- use boost::optional instead of std::optional
rgw: fetch_remote_obj() takes optional olh epoch
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit ff0280b)

Conflicts:
    src/rgw/rgw_cr_rados.h
    src/rgw/rgw_rados.cc
    src/rgw/rgw_rados.h
- use boost::optional instead of std::optional
rgw: fetch_remote_obj() applies olh even if object is current
even if we already have the latest version of an object, it may have
synced without a valid olh epoch. so we still need to apply its olh
modifications with this epoch. this change also has to be added to the
data changes log

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit b5ecc4e)

@smithfarm smithfarm force-pushed the smithfarm:wip-24985-luminous branch from 36957b5 to a00212c Sep 12, 2018

@smithfarm

This comment has been minimized.

Contributor

smithfarm commented Sep 12, 2018

jenkins test docs

cbodley added some commits Jun 1, 2018

rgw: SyncModule::sync_object() takes optional olh epoch
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit c0bc17b)

Conflicts:
	src/rgw/rgw_sync_module_aws.cc
- file does not exist in luminous
	src/rgw/rgw_data_sync.cc
	src/rgw/rgw_sync_module.h
	src/rgw/rgw_sync_module_es.cc
	 src/rgw/rgw_sync_module_log.cc
- use boost::optional instead of std::optional
rgw: bucket sync only provides an epoch for olh operations
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 2de295c)

Conflicts:
	src/rgw/rgw_data_sync.cc
- luminous uses ldout instead of tn->log
- use boost::optional instead of std::optional
rgw: CompleteMultipart applies its olh_epoch
RGWCompleteMultipart was using get_system_versioning_params() to read an
olh_epoch, but was never applying it to the bucket index operation

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit e4d1cc1)
rgw: bucket sync updates high marker for squashed entries
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 918fc38)

Conflicts:
	src/rgw/rgw_data_sync.cc
- trivial resolution

@smithfarm smithfarm force-pushed the smithfarm:wip-24985-luminous branch from a00212c to b5ce62f Sep 12, 2018

rgw: bucket sync only allows one olh op at a time
if olh operations on different instances of an object race to sync,
their olh epochs could be applied in the wrong order and result in one
operation being rejected by the olh log. serialize olh operations on the
same object name to prevent this from happening

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d120ca1)

Conflicts:
    src/rgw/rgw_data_sync.cc
- replaced tn->log with ldout

@smithfarm smithfarm force-pushed the smithfarm:wip-24985-luminous branch from b5ce62f to 667b18e Sep 12, 2018

@smithfarm

This comment has been minimized.

Contributor

smithfarm commented Sep 12, 2018

@theanalyst Thanks!

@cbodley @theanalyst Ready for review!

@cbodley

thank you very much for working through this! the conflict resolutions look good

@yuriw

This comment has been minimized.

Contributor

yuriw commented Sep 17, 2018

@yuriw yuriw merged commit 91cfbbc into ceph:luminous Sep 19, 2018

4 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details

@smithfarm smithfarm deleted the smithfarm:wip-24985-luminous branch Sep 25, 2018

@smithfarm smithfarm changed the title from luminous: multisite: object metadata operations are skipped by sync to luminous: rgw: multisite: object metadata operations are skipped by sync Oct 26, 2018

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