]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
neorados: Hold reference to implementation across operations
authorAdam C. Emerson <aemerson@redhat.com>
Fri, 30 May 2025 20:54:45 +0000 (16:54 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Tue, 5 Aug 2025 20:07:42 +0000 (16:07 -0400)
commit24e67fa8112221b452d8bd8dc8a9d689203d3054
tree217c85b158d34d181bbf5d4569f441382ee56ffd
parent8f6dd339d7dc63a983d8074d501eddf7f9952741
neorados: Hold reference to implementation across operations

Asynchrony combined with cancellations keeps leading to occasional
lifetime issues, so follow the best-practices of Asio I/O objects by
having completions keep a reference live.

The original NeoRados backing implements Asio's two-phase shutdown
properly.

The RadosClient backing does not, because it shares an Objecter with
completions that do not belong to it. In practice I don't think this
will matter since librados and neorados get shut down around the same
time.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/include/neorados/RADOS.hpp
src/neorados/RADOS.cc
src/neorados/RADOSImpl.cc
src/neorados/RADOSImpl.h
src/test/librados_test_stub/NeoradosTestStub.cc