From: Sam Lang Date: Wed, 27 Mar 2013 15:58:25 +0000 (-0500) Subject: mds: Delay session close if in clientreplay X-Git-Tag: v0.60~7^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F159%2Fhead;p=ceph.git mds: Delay session close if in clientreplay 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 --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 1b9def4b2711..a97cb723703a 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -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(m))->get_op() != CEPH_SESSION_REQUEST_CLOSE) || (m->get_type() == CEPH_MSG_CLIENT_REQUEST && (static_cast(m))->is_replay()))) { // replaying!