]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/osd: remove osd_op_params_t::user_at_version 58065/head
authorSamuel Just <sjust@redhat.com>
Thu, 9 May 2024 03:06:58 +0000 (20:06 -0700)
committerMatan Breizman <mbreizma@redhat.com>
Tue, 18 Jun 2024 07:27:17 +0000 (10:27 +0300)
commitdd72c0d8cb104d04173aec44af48ae743e0ff14f
treecf891376bd335c38462095ddbd3c4c2b228c49a0
parentea50765fb3f8cc4ff02df15f2991be38e75f3c0f
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>
(cherry picked from commit 85fdadab2adcfbec83a82c6f1bae1f4f31a96f54)
src/crimson/osd/ops_executer.h
src/crimson/osd/osd_operations/osdop_params.h
src/crimson/osd/pg_backend.cc