]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/tests: fix test_remap_pin_concurrent 68489/head
authorRonen Friedman <rfriedma@redhat.com>
Mon, 20 Apr 2026 15:32:32 +0000 (15:32 +0000)
committerRonen Friedman <rfriedma@redhat.com>
Mon, 20 Apr 2026 15:33:32 +0000 (15:33 +0000)
commitc82cd26ac4c64f7b307d5630a5bfb2204a8dc3b8
tree7d9fa4096240de9e11735ccdc6d4e6b6f15111a4
parent83619504ae4c5839203e5c021e6a567bd5358dfe
crimson/tests: fix test_remap_pin_concurrent

The test failed in the following sequence:

  1. 32 coroutines start in parallel, all calling try_get_pin(t, offset)
     with the same offset
  2. One coroutine succeeds in submit_transaction, which calls
     test_mappings.consume(delta) and modifies the shared test_mappings
  3. Other coroutines that haven't reached try_get_pin yet now hit the
     assertion because offset no longer exists in test_mappings

The fix is to add a guard before try_get_pin to check if test_mappings still
contains the offset. If it doesn't, we can safely exit early since that
means another coroutine already succeeded and modified the shared state.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/test/crimson/seastore/test_transaction_manager.cc