]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: fix ACK ordering on resent ops
authorSage Weil <sage@inktank.com>
Mon, 23 Jul 2012 23:51:03 +0000 (16:51 -0700)
committerSage Weil <sage@inktank.com>
Mon, 23 Jul 2012 23:51:03 +0000 (16:51 -0700)
commit67832c34a228c5cff1941eab3225969b5e66e44b
tree505c94deb0a755a6131bf9611f19c306ffc253c4
parentd9bfe9547d7ee610e94a4d485988287f8143903c
osd: fix ACK ordering on resent ops

The wait_for_ondisk handling fixed COMMIT ordering, but the ACKs need to
go back in the same order too.  For example:

 - op A is queued
 - client disconnects, both ACK and COMMIT replies are lost
 - client reconnects
 - op A and B are sent
 - op A is queued
 - op B is applied, ACK is sent
 - op A and B COMMITs are sent
 -> client's ack callbacks will see B and then A.

Fix this by creating a waiting_for_ack queue as well, and sending ACK
responses as needed.  Also handle the case where the ACK should be sent
immediately when the retry event is received.

Fixes: #2823
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Mike Ryan <mike.ryan@inktank.com>
src/osd/PG.h
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h