From: Abhishek Lekshmanan Date: Fri, 26 Apr 2019 14:20:15 +0000 (+0200) Subject: rgw: object expirer: handle resharded buckets X-Git-Tag: v15.1.0~2690^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7f958c64dff006885da7e0fafa51e56ecbc6f973;p=ceph.git rgw: object expirer: handle resharded buckets Previously we fetched the bucket instance info which changes during a reshard causing the bucket info to fail, since the subsequent checks will assume that would mean a deleted bucket, the expiry hint is purged as well, leaving a non deleted object as well as a deleted hint. This should fix newer runs of object expiry processes. Finding out stale expired objects will require more complex rgw-admin tooling support Fixes: https://tracker.ceph.com/issues/39495 Signed-off-by: Abhishek Lekshmanan --- diff --git a/src/rgw/rgw_object_expirer_core.cc b/src/rgw/rgw_object_expirer_core.cc index bce6ce4882f6..b2e302baab67 100644 --- a/src/rgw/rgw_object_expirer_core.cc +++ b/src/rgw/rgw_object_expirer_core.cc @@ -52,11 +52,14 @@ int RGWObjectExpirer::init_bucket_info(const string& tenant_name, * punching the tenant through the objexp_hint_entry, but now we * find that our instances do not actually have tenants. They are * unique thanks to IDs. So the tenant string is not needed... + + * XXX reloaded: it turns out tenants were needed after all since bucket ids + * are ephemeral, good call encoding tenant info! */ - const string bucket_instance_id = bucket_name + ":" + bucket_id; - int ret = store->get_bucket_instance_info(obj_ctx, bucket_instance_id, - bucket_info, NULL, NULL); - return ret; + + return store->get_bucket_info(obj_ctx, tenant_name, bucket_name, + bucket_info, nullptr, nullptr); + } int RGWObjectExpirer::garbage_single_object(objexp_hint_entry& hint)