]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: dont reuse stale RGWObjectCtx for get_bucket_info() 17835/head
authorCasey Bodley <cbodley@redhat.com>
Fri, 22 Sep 2017 16:03:57 +0000 (12:03 -0400)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 2 Oct 2017 20:49:28 +0000 (22:49 +0200)
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>
(cherry picked from commit 3f4f760a85f162262c5b419e9cf78966c7299f0a)

src/rgw/rgw_bucket.cc

index 6e67d98c2d44f34275be57ed7fc1a574a1800ac0..1c946919d786e5e530c1705260714d429df76ad2 100644 (file)
@@ -2130,8 +2130,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;