]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: avoid emitting cap warnings before evicting session 6170/head
authorJohn Spray <john.spray@redhat.com>
Fri, 2 Oct 2015 21:14:38 +0000 (22:14 +0100)
committerJohn Spray <john.spray@redhat.com>
Mon, 5 Oct 2015 09:28:26 +0000 (10:28 +0100)
In the case where a client dies, and another client immediately
tries to access a file locked by the dead client, we would
previously *sometimes* emit a "client.xyz isn't responding to
mclientcaps" warning to the cluster log, right before
evicting the stale session.  This was because the timeout
for the session eviction and the timeout for the
warning message are both 60s.

Fix this by checking the stale sessions before doing the
warning message check in Locker.  If a session is going
to get evicted in this tick, it will already be gone
by the time Locker thinks about emitting the warning
message.

Fixes: #13334
Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/MDSRank.cc

index ae9aef3c0f932bc86373df30541a753648eb57ef..7e2048d13eb231f3c6b5dbf1993c96ba3ef63178 100644 (file)
@@ -183,8 +183,8 @@ void MDSRankDispatcher::tick()
 
   // ...
   if (is_clientreplay() || is_active() || is_stopping()) {
-    locker->tick();
     server->find_idle_sessions();
+    locker->tick();
   }
   
   if (is_reconnect())