]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: dont reuse stale RGWObjectCtx for get_bucket_info() 17916/head
authorCasey Bodley <cbodley@redhat.com>
Fri, 22 Sep 2017 16:03:57 +0000 (12:03 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 22 Sep 2017 16:04:00 +0000 (12:04 -0400)
if the earlier call to store->get_bucket_entrypoint_info() failed with
ENOENT, the obj_ctx will cache exists=false.
put_bucket_entrypoint_info() doesn't invalidate that, so this call to
get_bucket_info() was reading from a stale cache and failing with ENOENT

Fixes: http://tracker.ceph.com/issues/21506
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_bucket.cc

index d321446fb13e60fdb808d43dfde04adf0519e822..3d6cbb3a87cb54389459c87ff4f42dfd290e3226 100644 (file)
@@ -2127,8 +2127,9 @@ public:
 
     /* link bucket */
     if (be.linked) {
+      RGWObjectCtx ctx(store);
       RGWBucketInfo bucket_info;
-      ret = store->get_bucket_info(obj_ctx, tenant_name, bucket_name,
+      ret = store->get_bucket_info(ctx, tenant_name, bucket_name,
                                    bucket_info, nullptr, nullptr);
       if (ret < 0) {
         return ret;