]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/osd: make osd_op_params::at_version coherent with last log entry 58064/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 23 Apr 2024 14:10:22 +0000 (14:10 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Sun, 16 Jun 2024 10:19:56 +0000 (13:19 +0300)
commit65674dbf594ad1584ea86833f9c4742f79ee8ac4
tree3c70ab2f0a240e6134d450a332b98a1ce01ccb55
parent51c534863ec368f0daec7c955102ac91010236cd
crimson/osd: make osd_op_params::at_version coherent with last log entry

Before this commit we were doing something like:

1. initialize `at_version` with PG::projected_last_update`
   **incremented by one**.
2. produce a log entry at such version.
3. increment `at_version` for the sake of a further production
   that may never come.

The problem is `osd_op_params::at_version` is higher by one
than the last log entry which hurts at later stages of
`osd_op_params` processing (I was hit in the shared EC code
by the assertion in `PG::op_applied`).

This patch changes the algorithm to:

A. initialize `at_version` with PG::projected_last_update`
   **incremented by one**.
B. increment `at_version` for the sake of the very next production.
C. produce a log entry at this version.

Co-authored-by: Matan Breizman <mbreizma@redhat.com>
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
(cherry picked from commit 5e787fda2e6186e3963e29225b4fa0ac145d2c45)
src/crimson/osd/ops_executer.cc
src/crimson/osd/ops_executer.h