Repository navigation
rgw/rados: don't rely on IoCtx::get_last_version() for async ops - #59998
Conversation
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
IoCtx::aio_operate() doesn't update IoCtx::get_last_version(). to make the resulting version_t available to the caller, we have to read it out of the AioCompletionImpl and return it to the caller Signed-off-by: Casey Bodley <[email protected]>
There was a problem hiding this comment.
this has been broken for ordered listings ever since CLSRGWIssueBucketList was added (10 years ago with 6f44f7a)
to make this work with sharded buckets, i think we'd need to track the versions for each shard object, and pass in the correct shard's version when sending dir suggestions
|
|
jenkins test make check |
|
confirmed that the reproducer from https://tracker.ceph.com/issues/63935#note-8 does produce version numbers again |
|
passed qa in https://pulpito.ceph.com/cbodley-2024-09-26_17:16:54-rgw-wip-63935-distro-default-smithi/ (100% green on the first try 🚀) |
instead of calling ioctx.get_last_version() after a rados operation, callers now pass version_t* as an output parameter. in the null_yield case, that version is assigned to ioctx.get_last_version() as normal. in the async case, we get the version out of librados::async_operate()'s return value Fixes: https://tracker.ceph.com/issues/63935 Signed-off-by: Casey Bodley <[email protected]>
|
|
jenkins test make check |
|
jenkins test windows |
|
jenkins test windows |
rgw uses
IoCtx::get_last_version()in a few places to determine the order of racing operations. most importantly, the rgw bucket index relies on this version number to detect racing writes/deletes so it can cancel the operations that lose the racebut the value of
get_last_version()is only updated by synchronous calls toIoCtx::operate(). after switching torgw_rados_operate()for these operations so that coroutines could suspend instead of block,get_last_version()is returning 0 because we're usingIoCtx::aio_operate()under the hoodin the coroutine case,
rgw_rados_operate()useslibrados::async_operate()from librados_asio.h. these librados_asio.h functions now get the version number out ofAioCompletionand return it to the callerrgw_rados_operate()now receives this version number and exposes it as an optional output parameter. the following callers that usedget_last_version()afterwards now use that output parameter instead:https://tracker.ceph.com/issues/63935
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e