From af1bc2220f6d81cfa93cbb52d6b24b2a5b93934c Mon Sep 17 00:00:00 2001 From: Xuehan Xu Date: Fri, 22 Nov 2024 16:38:02 +0800 Subject: [PATCH] crimson/osd/replicated_backend: make sure the check on whether to send ops to replica osds and the pg log append happens in the same continuation Since backfill relies on the pg log to discover new modifications, we need to make sure backfill always discover the modification that's not sent to replica osds. Signed-off-by: Xuehan Xu --- src/crimson/osd/replicated_backend.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crimson/osd/replicated_backend.cc b/src/crimson/osd/replicated_backend.cc index f25409b5c7b..6c8abecffaf 100644 --- a/src/crimson/osd/replicated_backend.cc +++ b/src/crimson/osd/replicated_backend.cc @@ -104,6 +104,8 @@ ReplicatedBackend::submit_transaction( } } + co_await pg.update_snap_map(log_entries, txn); + std::vector to_push_clone; std::vector to_push_delete; auto sends = std::make_unique>>(); @@ -140,8 +142,6 @@ ReplicatedBackend::submit_transaction( pg_shard.osd, std::move(m), map_epoch)); } - co_await pg.update_snap_map(log_entries, txn); - pg.log_operation( std::move(log_entries), osd_op_p.pg_trim_to, -- 2.39.5