]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
RGWReplicaBucketLogger: store bucket replica logs in the .logs pool
authorGreg Farnum <greg@inktank.com>
Fri, 21 Jun 2013 18:33:44 +0000 (11:33 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Fri, 21 Jun 2013 18:47:09 +0000 (11:47 -0700)
Signed-off-by: Greg Farnum <greg@inktank.com>
src/rgw/rgw_replica_log.cc
src/rgw/rgw_replica_log.h

index 9934902aef9814db9924bc8cf6232f23b99dda26..2c6659643c80717f484159807a04e35efeb5af34 100644 (file)
@@ -105,3 +105,10 @@ int RGWReplicaObjectLogger::create_log_objects(int shards)
   }
   return r;
 }
+
+RGWReplicaBucketLogger::RGWReplicaBucketLogger(RGWRados *_store) :
+  RGWReplicaLogger(_store)
+{
+  store->get_log_pool_name(pool);
+  prefix = "replica_log.";
+}
index fd461c2340ff883d1fa7b173c3c7f6d6ce2c47c6..131a7efa98ad88d2349c086e2fe9ca76dd512bc6 100644 (file)
@@ -90,22 +90,23 @@ public:
 };
 
 class RGWReplicaBucketLogger : private RGWReplicaLogger {
+  string pool;
+  string prefix;
 public:
-  RGWReplicaBucketLogger(RGWRados *_store) :
-    RGWReplicaLogger(_store) {}
+  RGWReplicaBucketLogger(RGWRados *_store);
   int update_bound(const rgw_bucket& bucket, const string& daemon_id,
                    const string& marker, const utime_t& time,
                    const list<pair<string, utime_t> > *entries) {
-    return RGWReplicaLogger::update_bound(bucket.name, bucket.index_pool,
+    return RGWReplicaLogger::update_bound(prefix+bucket.name, pool,
                                           daemon_id, marker, time, entries);
   }
   int delete_bound(const rgw_bucket& bucket, const string& daemon_id) {
-    return RGWReplicaLogger::delete_bound(bucket.name, bucket.index_pool,
+    return RGWReplicaLogger::delete_bound(prefix+bucket.name, pool,
                                           daemon_id);
   }
   int get_bounds(const rgw_bucket& bucket, string& marker, utime_t& oldest_time,
                  list<cls_replica_log_progress_marker>& markers) {
-    return RGWReplicaLogger::get_bounds(bucket.name, bucket.index_pool,
+    return RGWReplicaLogger::get_bounds(prefix+bucket.name, pool,
                                         marker, oldest_time, markers);
   }
 };