]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: rgw_user_sync_all_stats uses bucket entrypoint 24595/head
authorCasey Bodley <cbodley@redhat.com>
Mon, 15 Oct 2018 20:25:20 +0000 (16:25 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 15 Oct 2018 20:45:16 +0000 (16:45 -0400)
commitb33328ff9bacd11d8449cb3b5c52f94d9dffec6e
tree2d96ebd056da4eee30077581128ad09b70696f79
parente1b97fc2e804d040e8aa6fc8a94e336222d1175e
rgw: rgw_user_sync_all_stats uses bucket entrypoint

when bucket reshard completes, rgw_link_bucket() passes the new bucket
instance id down to cls_user, but cls_user_set_buckets_info() does not
change the instance id when it's updating an existing bucket. so when
rgw_user_sync_all_stats() looks up each of the user's buckets, it uses
the original bucket instance id instead of the resharded one and
calculates user stats that may not match the current bucket stats

as a workaround, rgw_user_sync_all_stats() no longer relies on the
bucket instance id it gets from rgw_read_user_buckets(), and instead
calls get_bucket_info() to look up the current instance in the bucket
entrypoint

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_user.cc