]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: api adjustments following rebase
authorYehuda Sadeh <yehuda@redhat.com>
Mon, 6 Aug 2018 19:15:25 +0000 (12:15 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Tue, 11 Dec 2018 08:10:43 +0000 (00:10 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_cr_tools.cc
src/rgw/rgw_sync_module_pubsub.cc

index 1d5565acf2219fda3cc814bcf98e2f7eec0387bf..d25c3166caf5ce855a387c2d8f5e932f1a687dd2 100644 (file)
@@ -1,3 +1,5 @@
+#include "common/errno.h"
+
 #include "rgw_cr_tools.h"
 #include "rgw_bucket.h"
 #include "rgw_user.h"
index d58a8678c91249d8e7d61b714c892c5132189556..7a7bcf05b5f5740839b43b6ce6c509a02bb56ba8 100644 (file)
@@ -1215,13 +1215,13 @@ public:
 class RGWPSHandleRemoteObjCBCR : public RGWStatRemoteObjCBCR {
   RGWDataSyncEnv *sync_env;
   PSEnvRef env;
-  uint64_t versioned_epoch;
+  std::optional<uint64_t> versioned_epoch;
   EventRef event;
   TopicsRef topics;
 public:
   RGWPSHandleRemoteObjCBCR(RGWDataSyncEnv *_sync_env,
                           RGWBucketInfo& _bucket_info, rgw_obj_key& _key,
-                          PSEnvRef _env, uint64_t _versioned_epoch,
+                          PSEnvRef _env, std::optional<uint64_t> _versioned_epoch,
                           TopicsRef& _topics) : RGWStatRemoteObjCBCR(_sync_env, _bucket_info, _key),
                                                                       sync_env(_sync_env),
                                                                       env(_env),
@@ -1260,12 +1260,12 @@ public:
 
 class RGWPSHandleRemoteObjCR : public RGWCallStatRemoteObjCR {
   PSEnvRef env;
-  uint64_t versioned_epoch;
+  std::optional<uint64_t> versioned_epoch;
   TopicsRef topics;
 public:
   RGWPSHandleRemoteObjCR(RGWDataSyncEnv *_sync_env,
                         RGWBucketInfo& _bucket_info, rgw_obj_key& _key,
-                        PSEnvRef _env, uint64_t _versioned_epoch,
+                        PSEnvRef _env, std::optional<uint64_t> _versioned_epoch,
                         TopicsRef& _topics) : RGWCallStatRemoteObjCR(_sync_env, _bucket_info, _key),
                                                            env(_env), versioned_epoch(_versioned_epoch),
                                                            topics(_topics) {
@@ -1284,12 +1284,12 @@ class RGWPSHandleObjCreateCR : public RGWCoroutine {
   RGWBucketInfo bucket_info;
   rgw_obj_key key;
   PSEnvRef env;
-  uint64_t versioned_epoch;
+  std::optional<uint64_t> versioned_epoch;
   TopicsRef topics;
 public:
   RGWPSHandleObjCreateCR(RGWDataSyncEnv *_sync_env,
                        RGWBucketInfo& _bucket_info, rgw_obj_key& _key,
-                       PSEnvRef _env, uint64_t _versioned_epoch) : RGWCoroutine(_sync_env->cct),
+                       PSEnvRef _env, std::optional<uint64_t> _versioned_epoch) : RGWCoroutine(_sync_env->cct),
                                                                    sync_env(_sync_env),
                                                                    bucket_info(_bucket_info),
                                                                    key(_key),
@@ -1393,8 +1393,8 @@ public:
     ldout(sync_env->cct, 5) << conf->id << ": start" << dendl;
     return new RGWPSInitEnvCBCR(sync_env, env);
   }
-  RGWCoroutine *sync_object(RGWDataSyncEnv *sync_env, RGWBucketInfo& bucket_info, rgw_obj_key& key, uint64_t versioned_epoch, rgw_zone_set *zones_trace) override {
-    ldout(sync_env->cct, 10) << conf->id << ": sync_object: b=" << bucket_info.bucket << " k=" << key << " versioned_epoch=" << versioned_epoch << dendl;
+  RGWCoroutine *sync_object(RGWDataSyncEnv *sync_env, RGWBucketInfo& bucket_info, rgw_obj_key& key, std::optional<uint64_t> versioned_epoch, rgw_zone_set *zones_trace) override {
+    ldout(sync_env->cct, 10) << conf->id << ": sync_object: b=" << bucket_info.bucket << " k=" << key << " versioned_epoch=" << versioned_epoch.value_or(0) << dendl;
     return new RGWPSHandleObjCreateCR(sync_env, bucket_info, key, env, versioned_epoch);
   }
   RGWCoroutine *remove_object(RGWDataSyncEnv *sync_env, RGWBucketInfo& bucket_info, rgw_obj_key& key, real_time& mtime, bool versioned, uint64_t versioned_epoch, rgw_zone_set *zones_trace) override {