]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rados.py: keep reference to python callbacks 3674/head
authorJosh Durgin <jdurgin@redhat.com>
Tue, 10 Feb 2015 04:50:23 +0000 (20:50 -0800)
committerJosh Durgin <jdurgin@redhat.com>
Tue, 10 Feb 2015 04:53:42 +0000 (20:53 -0800)
commit36d37aadbbbece28d70e827511f1a473d851463d
treedb70028987df9096df7e4a1055a0730eaa0393b2
parentb025fbfa22416ea05fe48a09d20cf22672fd3fc8
rados.py: keep reference to python callbacks

If we don't keep a reference to these, the librados aio calls will
segfault since the python-level callbacks will have been garbage
collected. Passing them to aio_create_completion() does not take a
reference to them. Keep a reference in the python Completion object
associated with the request, since they need the same lifetime.

This fixes a regression from 60b019f69aa0e39d276c669698c92fc890599f50.

Fixes: #10775
Backport: dumpling, firefly, giant
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
src/pybind/rados.py