]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson: clear obcs whether referenced or not upon replica write
authorSamuel Just <sjust@redhat.com>
Fri, 22 Nov 2024 02:34:12 +0000 (18:34 -0800)
committerSamuel Just <sjust@redhat.com>
Tue, 10 Dec 2024 15:32:39 +0000 (15:32 +0000)
commit7a36f74ceab5773b6ac411f12e9b824123dc6a53
tree848af0ed2b969e0834ec0a88da7b5e64d14a8209
parent4a638e51521c6b7f0364fb74a059627d28bffe18
crimson: clear obcs whether referenced or not upon replica write

It's always possible for there to be an in-progress replica-read
when the replica processes a repop.  It's rare in our tests because
the read and write submitted by the test client would need to
overlap in time.  This makes the results non-deterministic and
thus a somewhat less sensitive test.  Note, the space of valid
results is well defined -- it would have to be state before or
after any of the outstanding writes.  Any other result or a torn
read would be wrong.  It's probably worth updating RadosModel
to add such a pattern, but we can do that later.

This branch makes this race much more likely and even observable
with the existing RadosModel implementation as it extends the
obc lifetime past the point of returning the result to the client
in order to ensure that it outlives the handle.

Fixes: https://tracker.ceph.com/issues/69013
Signed-off-by: Samuel Just <sjust@redhat.com>
src/common/intrusive_lru.h
src/crimson/osd/object_context.h
src/test/common/test_intrusive_lru.cc