From: Matan Breizman Date: Tue, 23 Jul 2024 13:12:50 +0000 (+0000) Subject: osd/ReplicatedBackend: assert non-trivial obc existence X-Git-Tag: testing/wip-pdonnell-testing-20250218.200041-debug~12^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=06a5ad49e92ea64d454b93a23a159ab4e5bded09;p=ceph-ci.git 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 --- 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,