pybind/rados: fix object lifetime issues and other bugs in aio #7778
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes some subtle and some not so subtle object lifetime issues in the aio completion implementation in rados.pyx.
WRT the comment at the end of the second commit, where we still have a case of completion objects living longer than they should if an exception arrives at the wrong time (not likely to be a problem in practice, but worth fixing): I'm working on aio support for the rbd bindings, and am trying out a different approach to keeping the completion objects alive. If that works out I'll switch the rados bindings to the same approach and that should fix the problem.
cc @jdurgin @sileht