]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
crimson/osd: remove osd_op_params_t::user_at_version
authorSamuel Just <sjust@redhat.com>
Thu, 9 May 2024 03:06:58 +0000 (20:06 -0700)
committerSamuel Just <sjust@redhat.com>
Fri, 10 May 2024 02:58:34 +0000 (19:58 -0700)
commit85fdadab2adcfbec83a82c6f1bae1f4f31a96f54
tree79259dbe73c6ab88bf052890acaf99403e433b17
parent7e0dde721d5203623b06351bb4b261b3c9fe2c33
crimson/osd: remove osd_op_params_t::user_at_version

osd_op_params_t::user_at_version was populated from
osd_op_params_t::at_version before the call to prepare_transaction,
which incremented osd_op_params_t::at_version.version.  As a result,
the value stored in object_info_t::user_version ended up one version
behind object_info_t::version.  The log entry, on the other hand,
ended up with the correct version as OpsExecutor::prepare_transaction
populates it directly from at_version.  As a result, the primary could
return different versions to the client depending on whether the IO was
already in the log.

This commit eliminates osd_op_params_t::user_at_version and updates
PGBackend::mutate_object to behave like prepare_transaction.  Because
the prior commit removes the prepare_transaction increment, this isn't
strictly necessary, but it is simpler.

Fixes: https://tracker.ceph.com/issues/65857
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/osd/ops_executer.h
src/crimson/osd/osd_operations/osdop_params.h
src/crimson/osd/pg_backend.cc