From: Shai Fultheim Date: Sun, 14 Jun 2026 06:45:43 +0000 (+0300) Subject: test/crimson/seastore: tolerate enoent in concurrent remap/overwrite helpers X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8816532f8ab1d1f970fdf92bd3dda84f92a6a3fa;p=ceph.git test/crimson/seastore: tolerate enoent in concurrent remap/overwrite helpers test_remap_pin_concurrent races 32 transactions to remap or overwrite the same extent; exactly one is expected to commit while the rest detect the conflict and back out. The harness helpers try_get_pin() and try_get_extent() treated only ct_error::eagain as a tolerable racing outcome -- returning an empty result so the caller's is_conflicted()/null check counts the transaction as conflicted -- and routed every other error to ct_error::assert_all(), aborting the test. When a competing transaction retires or remaps a mapping mid-race, a subsequent get_pin()/read_extent() of that laddr legitimately resolves to ct_error::enoent (ENOENT from BtreeLBAManager::get_cursor) rather than eagain. The helpers then aborted with "get_extent got invalid error" instead of treating it as a lost-the-race back-out. The failure is intermittent and pre-existing: a gap in the test harness, not a fault in the store. Handle enoent exactly like eagain in try_get_pin() and both try_get_extent() overloads: return an empty result so the existing conflict/back-out path runs. Reproduction: ninja -C build unittest-transaction-manager ./bin/unittest-transaction-manager \ --gtest_filter='*test_remap_pin_concurrent*' --smp 1 --gtest_repeat=30 Before this change the run aborts within a few iterations with "get_extent got invalid error"; with it, all 30 iterations across the four device variants pass. Signed-off-by: Shai Fultheim --- diff --git a/src/test/crimson/seastore/test_transaction_manager.cc b/src/test/crimson/seastore/test_transaction_manager.cc index 59105ae842e..52a734ceec1 100644 --- a/src/test/crimson/seastore/test_transaction_manager.cc +++ b/src/test/crimson/seastore/test_transaction_manager.cc @@ -602,6 +602,9 @@ struct transaction_manager_test_t : [](const crimson::ct_error::eagain &e) { return seastar::make_ready_future(); }, + [](const crimson::ct_error::enoent &e) { + return seastar::make_ready_future(); + }, crimson::ct_error::assert_all( "get_extent got invalid error" ) @@ -632,6 +635,9 @@ struct transaction_manager_test_t : [](const crimson::ct_error::eagain &e) { return seastar::make_ready_future(); }, + [](const crimson::ct_error::enoent &e) { + return seastar::make_ready_future(); + }, crimson::ct_error::assert_all( "get_extent got invalid error" ) @@ -760,6 +766,9 @@ struct transaction_manager_test_t : [](const crimson::ct_error::eagain &e) { return seastar::make_ready_future>(); }, + [](const crimson::ct_error::enoent &e) { + return seastar::make_ready_future>(); + }, crimson::ct_error::assert_all( "get_extent got invalid error" )