From 06a5ad49e92ea64d454b93a23a159ab4e5bded09 Mon Sep 17 00:00:00 2001 From: Matan Breizman Date: Tue, 23 Jul 2024 13:12:50 +0000 Subject: [PATCH] osd/ReplicatedBackend: assert non-trivial obc existence Added to help debug: https://tracker.ceph.com/issues/50608 More information: https://gist.github.com/Matan-B/24b49e9b734259f06edf17fdfea5d24d Signed-off-by: Matan Breizman --- src/osd/ReplicatedBackend.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/osd/ReplicatedBackend.cc b/src/osd/ReplicatedBackend.cc index 7ce8fbcd210..cf13e1143e0 100644 --- a/src/osd/ReplicatedBackend.cc +++ b/src/osd/ReplicatedBackend.cc @@ -917,6 +917,7 @@ struct C_ReplicatedBackend_OnPullComplete : GenContext { ceph_assert(j != bc->pulling.end()); ObjectContextRef obc = j->second.obc; bc->clear_pull(j, false /* already did it */); + ceph_assert(obc); int started = bc->start_pushes(i.hoid, obc, h); if (started < 0) { bc->pushing[i.hoid].clear(); @@ -1932,7 +1933,9 @@ bool ReplicatedBackend::handle_pull_response( pull_info.lock_manager); } - + // if `first` is true, obc was just set above. Otherwise, we should be + // able to reuse it. + ceph_assert(pull_info.obc); interval_set usable_intervals; bufferlist usable_data; trim_pushed_data(pull_info.recovery_info.copy_subset, -- 2.39.5