]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: Add try_refresh_bucket_info function
authorAdam C. Emerson <aemerson@redhat.com>
Thu, 16 Nov 2017 19:42:58 +0000 (14:42 -0500)
committerAdam C. Emerson <aemerson@redhat.com>
Thu, 4 Jan 2018 21:52:07 +0000 (16:52 -0500)
commit2e3a89f019a776ad5731e49cd16b51b3f8e2e807
tree50cfbae9f62159c9b55174af5a215bdf9bd7fc1c
parentbccb4839ee8fde4636001976df1890b7a0f1f0a0
rgw: Add try_refresh_bucket_info function

Sometimes operations fail with -ECANCELED. This means we got raced. If
this happens we should update our bucket info from cache and try again.

Some user reports suggest that our cache may be getting and staying
out of sync. This is a bug and should be fixed, but it would also be
nice if we were robust enough to notice the problem and refresh.

So in that case, we invalidate the cache and fetch direct from the
OSD, putting a warning in the log.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 9114e5e50995f0c7d2be5c24aa4712d89cd89f48)
Fixes: http://tracker.ceph.com/issues/22517
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h