From e2e1bd9c4063b5e7181c60499530e7dbfe0f1b3c Mon Sep 17 00:00:00 2001 From: John Spray Date: Fri, 2 Oct 2015 22:14:38 +0100 Subject: [PATCH] mds: avoid emitting cap warnings before evicting session 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 --- src/mds/MDSRank.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mds/MDSRank.cc b/src/mds/MDSRank.cc index ae9aef3c0f93..7e2048d13eb2 100644 --- a/src/mds/MDSRank.cc +++ b/src/mds/MDSRank.cc @@ -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()) -- 2.47.3