diff options
author | Greg Farnum <greg@inktank.com> | 2013-06-21 11:33:44 -0700 |
---|---|---|
committer | Yehuda Sadeh <yehuda@inktank.com> | 2013-06-21 11:47:09 -0700 |
commit | 469900e62b80d46f602bf2ebbe7b1778a381ca87 (patch) | |
tree | dec15520cf513cd05f44090e9cf356a0b327e3dc | |
parent | 409422be6de3b2b3c134e6308e2d2eb4a832a35e (diff) | |
download | ceph-469900e62b80d46f602bf2ebbe7b1778a381ca87.tar.gz |
RGWReplicaBucketLogger: store bucket replica logs in the .logs pool
Signed-off-by: Greg Farnum <greg@inktank.com>
-rw-r--r-- | src/rgw/rgw_replica_log.cc | 7 | ||||
-rw-r--r-- | src/rgw/rgw_replica_log.h | 11 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/rgw/rgw_replica_log.cc b/src/rgw/rgw_replica_log.cc index 9934902aef9..2c6659643c8 100644 --- a/src/rgw/rgw_replica_log.cc +++ b/src/rgw/rgw_replica_log.cc @@ -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."; +} diff --git a/src/rgw/rgw_replica_log.h b/src/rgw/rgw_replica_log.h index fd461c2340f..131a7efa98a 100644 --- a/src/rgw/rgw_replica_log.h +++ b/src/rgw/rgw_replica_log.h @@ -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); } }; |