New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python-rados: implement new aio_stat. #11006
Conversation
Would this suffer from the same problem as |
this looks good, could you add a simple test for it to src/test/pybind/test_rados.py? What problem with aio_read are you encountering? |
I see that with aio_read, it stores the buffer inside the python completion. Just wondering if the same would be required for aio_stat too. https://github.com/ceph/ceph/blob/master/src/pybind/rados/rados.pyx#L2125-L2130 |
Rebased, previous HEAD was 41e3e00 |
lock.wait() | ||
eq(comp.get_return_value(), -2) | ||
|
||
self.ioctx.write("foo", "bar") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the data written should be a bytes object for python 3
I'm not certain whether it's required, but it's more clearly correct to explicitly include the reference to the time and size in the completion object |
Well, I've been running a migration script for over a week straight now that uses aio_stat(), and I'm not seeing any leaking of memory from here. |
This change adds python API for the following C methods: * rados_aio_stat Signed-off-by: Iain Buclaw <iain.buclaw@sociomantic.com>
Good to know. For my own edification I verified that pmtime and psize are saved in a closure for on_complete() by reading the intermediate C code. Thanks! |
This change adds python API for the following C methods:
Signed-off-by: Iain Buclaw iain.buclaw@sociomantic.com