Project

General

Profile

Actions

Support #19998

closed

librados aio callbacks thread safety

Added by Alexey Knyshev almost 7 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
librados
Target version:
-
% Done:

0%

Tags:
Reviewed:
Affected Versions:
Pull request ID:

Description

As stated in documentation (http://docs.ceph.com/docs/master/rados/api/librados/#asychronous-io):

The callbacks are called in order of receipt, so the safe callback may be triggered before the complete callback, and vice versa.

Does it mean the following: if I want to react only on ack event as soon as possible should I register both callbacks (cb_complete, cb_safe) and do the needful in the first called whether complete or safe called. If so, should I protect some non-thread safe data in this callbacks or in other words: "Is it possible that this two callbacks would be called in different threads inside librados?"

And in addition, does it apply to libradosstripper too?

Actions

Also available in: Atom PDF