From 469900e62b80d46f602bf2ebbe7b1778a381ca87 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Fri, 21 Jun 2013 11:33:44 -0700 Subject: [PATCH] RGWReplicaBucketLogger: store bucket replica logs in the .logs pool Signed-off-by: Greg Farnum --- src/rgw/rgw_replica_log.cc | 7 +++++++ 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 9934902aef981..2c6659643c807 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 fd461c2340ff8..131a7efa98ad8 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 > *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& markers) { - return RGWReplicaLogger::get_bounds(bucket.name, bucket.index_pool, + return RGWReplicaLogger::get_bounds(prefix+bucket.name, pool, marker, oldest_time, markers); } }; -- 2.39.5