From: Matan Breizman Date: Wed, 5 Mar 2025 15:56:52 +0000 (+0000) Subject: crimson/osd/replicated_backend: Introduce pending_shart_t::last_complete X-Git-Tag: testing/wip-vshankar-testing-20250311.100342-debug~9^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=522cc6c3c415c3caece54dd1e111643072af52a2;p=ceph-ci.git crimson/osd/replicated_backend: Introduce pending_shart_t::last_complete This will be used (next commit) once we'll call complete_write from ReplicatedBackend and not from PG as we do now. Signed-off-by: Matan Breizman Signed-off-by: Xuehan Xu --- diff --git a/src/crimson/osd/replicated_backend.cc b/src/crimson/osd/replicated_backend.cc index 6c8abecffaf..987432e08db 100644 --- a/src/crimson/osd/replicated_backend.cc +++ b/src/crimson/osd/replicated_backend.cc @@ -92,7 +92,11 @@ ReplicatedBackend::submit_transaction( const ceph_tid_t tid = shard_services.get_tid(); auto pending_txn = - pending_trans.try_emplace(tid, pg_shards.size(), osd_op_p.at_version).first; + pending_trans.try_emplace( + tid, + pg_shards.size(), + osd_op_p.at_version, + pg.get_last_complete()).first; bufferlist encoded_txn; encode(txn, encoded_txn); diff --git a/src/crimson/osd/replicated_backend.h b/src/crimson/osd/replicated_backend.h index d5844b23a0c..ddd3bed1a6f 100644 --- a/src/crimson/osd/replicated_backend.h +++ b/src/crimson/osd/replicated_backend.h @@ -44,8 +44,13 @@ private: const pg_shard_t whoami; class pending_on_t : public seastar::weakly_referencable { public: - pending_on_t(size_t pending, const eversion_t& at_version) - : pending{static_cast(pending)}, at_version(at_version) + pending_on_t( + size_t pending, + const eversion_t& at_version, + const eversion_t& last_complete) + : pending{static_cast(pending)}, + at_version(at_version), + last_complete(last_complete) {} unsigned pending; // The order of pending_txns' at_version must be the same as their @@ -54,6 +59,7 @@ private: // way, client requests at_version must be updated synchorously/simultaneously // with ceph_tid_t. const eversion_t at_version; + const eversion_t last_complete; crimson::osd::acked_peers_t acked_peers; seastar::shared_promise<> all_committed; };