]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rados.py: keep reference to python callbacks 4046/head
authorJosh Durgin <jdurgin@redhat.com>
Tue, 10 Feb 2015 04:50:23 +0000 (20:50 -0800)
committerLoic Dachary <ldachary@redhat.com>
Tue, 17 Mar 2015 16:47:53 +0000 (17:47 +0100)
commit28583276254ba6121b93688a6c6d8fab6588c864
tree8fb3445fd371742703986d73f521c663436d667e
parent1b5fb51a995d5d672a46176240d5887354c12967
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>
(cherry picked from commit 36d37aadbbbece28d70e827511f1a473d851463d)
(cherry picked from commit 5f1245e131e33a98572408c8223deed2c7cf7b75)
src/pybind/rados.py