Skip to content

Commit

Permalink
mds: don't kick clients if we've been laggy ourselves
Browse files Browse the repository at this point in the history
  • Loading branch information
liewegas committed Mar 22, 2010
1 parent e53d35f commit 020f920
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/TODO
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 8 additions & 0 deletions src/mds/Server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 020f920

Please sign in to comment.