diff --git a/src/TODO b/src/TODO index a524254ca5229..5db30e3163d64 100644 --- a/src/TODO +++ b/src/TODO @@ -60,7 +60,6 @@ filestore - need an osdmap cache layer? bugs -- be lenient about timing out clients if we are laggy ourselves - mds prepare_force_open_sessions, then import aborts.. session is still OPENING but no client_session is sent... - rm -r failure (on kernel tree) - dbench 1, restart mds (may take a few times), dbench will error out. diff --git a/src/mds/Server.cc b/src/mds/Server.cc index ff4004a68ef2e..d74bf4b04b421 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -407,6 +407,14 @@ void Server::find_idle_sessions() // autoclose cutoff = now; cutoff -= g_conf.mds_session_autoclose; + + // don't kick clients if we've been laggy + if (mds->laggy_until > cutoff) { + dout(10) << " laggy_until " << mds->laggy_until << " > cutoff " << cutoff + << ", not kicking any clients to be safe" << dendl; + return; + } + while (1) { Session *session = mds->sessionmap.get_oldest_session(Session::STATE_STALE); if (!session) break;