From 37ddfc61c3376afeccfe7a8029412b9a38401bfc Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Fri, 22 Sep 2017 12:03:57 -0400 Subject: [PATCH] rgw: dont reuse stale RGWObjectCtx for get_bucket_info() 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 (cherry picked from commit 3f4f760a85f162262c5b419e9cf78966c7299f0a) --- src/rgw/rgw_bucket.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_bucket.cc b/src/rgw/rgw_bucket.cc index 6e67d98c2d4..1c946919d78 100644 --- a/src/rgw/rgw_bucket.cc +++ b/src/rgw/rgw_bucket.cc @@ -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; -- 2.47.3