]> 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, 9 Sep 2025 00:10:08 +0000 (20:10 -0400)
commitb418c399c3d63e30b32bec0ca50e047319a58619
treec34d8df698f062b61d11e05896c084dec4934984
parent8463248e1403470ba2585de9f63c9c2a3f8569b6
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>
(cherry picked from commit 57c9723928b4d2b2148ca0dd4d505acdc071f8eb)
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