]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: rgw_user_sync_all_stats uses bucket entrypoint 24911/head
authorCasey Bodley <cbodley@redhat.com>
Mon, 15 Oct 2018 20:25:20 +0000 (16:25 -0400)
committerNathan Cutler <ncutler@suse.com>
Sat, 3 Nov 2018 14:22:39 +0000 (15:22 +0100)
commitc037800ef515d3fe74b7dbf30524ab24e3f6c1d8
tree76f86bedd70843af2a30b21ab1a85c279ba16311
parentd93ca5c342eea3eef4ffc42dd0f0051185cf5d07
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>
(cherry picked from commit b33328ff9bacd11d8449cb3b5c52f94d9dffec6e)
src/rgw/rgw_user.cc