]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: Don't signal requests already handled 149/head
authorSam Lang <sam.lang@inktank.com>
Mon, 25 Mar 2013 19:55:20 +0000 (14:55 -0500)
committerSam Lang <sam.lang@inktank.com>
Tue, 26 Mar 2013 22:08:49 +0000 (17:08 -0500)
commit7c1e9be0e9cb4fa31386548f4ba5a6c0e87418b1
tree1ecad7e7f48792a8116941ec86a57f2b26d197e8
parentb9141e94931c5ddb4fb1687da08f5c75f8ad6703
client: Don't signal requests already handled

The assertion failure reported in #4530 is triggered
by the following:

1. client sends request
2. mds sends unsafe reply
3. before request gets journaled, mds is killed
4. mds restarts
5. client receives session close (from close request before restart)
6. session close does kick_requests()
7. kick_requests tries to signal caller that doesn't exist.

This fix avoids signaling a caller if the unsafe reply
has been received and the make_request() function has completed.
We do this by setting the caller_cond to null once the caller
is woken up, and only signal the caller in kick_requests if
caller_cond is non-null.  This avoids trying to resend requests
listed in mds_request but that have already received unsafe replies.
The unsafe requests are handled by resend_unsafe_requests() code,
so skipping those requests is allowable.

Fixes #4530.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/client/Client.cc