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
08cd49ab5cdb50565c554adb586a2230cd058d42)
return 0;
}
+static bool has_olh_epoch(RGWModifyOp op) {
+ return op == CLS_RGW_OP_LINK_OLH || op == CLS_RGW_OP_UNLINK_INSTANCE;
+}
+
class RGWBucketShardIncrementalSyncCR : public RGWCoroutine {
RGWDataSyncEnv *sync_env;
const rgw_bucket_shard& bs;
continue;
}
auto& squash_entry = squash_map[make_pair(e.object, e.instance)];
+ // don't squash over olh entries - we need to apply their olh_epoch
+ if (has_olh_epoch(squash_entry.second) && !has_olh_epoch(e.op)) {
+ continue;
+ }
if (squash_entry.first <= e.timestamp) {
squash_entry = make_pair<>(e.timestamp, e.op);
}