]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: Delay session close if in clientreplay 159/head
authorSam Lang <sam.lang@inktank.com>
Wed, 27 Mar 2013 15:58:25 +0000 (10:58 -0500)
committerSam Lang <sam.lang@inktank.com>
Wed, 27 Mar 2013 16:06:28 +0000 (11:06 -0500)
If the mds is in clientreplay, a session close
request needs to be delayed until it reaches
active.  Otherwise, the session state gets set to
'closing', and the replay requests get dropped on the
floor.

Fixes #4564.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
src/mds/Server.cc

index 1b9def4b2711b005a8d7cee22f235d4418884208..a97cb723703a9425237a22f09c8c882a4cb9e377 100644 (file)
@@ -103,7 +103,10 @@ void Server::dispatch(Message *m)
       mds->enqueue_replay(new C_MDS_RetryMessage(mds, m));
       return;
     } else if (mds->is_clientreplay() &&
-              (m->get_type() == CEPH_MSG_CLIENT_SESSION ||
+              // session open requests need to be handled during replay,
+              // close requests need to be delayed
+              ((m->get_type() == CEPH_MSG_CLIENT_SESSION &&
+                (static_cast<MClientSession*>(m))->get_op() != CEPH_SESSION_REQUEST_CLOSE) ||
                (m->get_type() == CEPH_MSG_CLIENT_REQUEST &&
                 (static_cast<MClientRequest*>(m))->is_replay()))) {
       // replaying!