diff options
Diffstat (limited to 'src/rgw/rgw_bucket.cc')
-rw-r--r-- | src/rgw/rgw_bucket.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/rgw/rgw_bucket.cc b/src/rgw/rgw_bucket.cc index 0426bede76c..bd17b25562d 100644 --- a/src/rgw/rgw_bucket.cc +++ b/src/rgw/rgw_bucket.cc @@ -1597,6 +1597,21 @@ public: list_keys_info *info = (list_keys_info *)handle; delete info; } + + /* + * hash entry for mdlog placement. Use the same hash key we'd have for the bucket entry + * point, so that the log entries end up at the same log shard, so that we process them + * in order + */ + virtual void get_hash_key(const string& section, const string& key, string& hash_key) { + string k; + int pos = key.find(':'); + if (pos < 0) + k = key; + else + k = key.substr(0, pos); + hash_key = "bucket:" + k; + } }; void rgw_bucket_init(RGWMetadataManager *mm) |