Skip to content

Commit

Permalink
Meta server: do not declare inactivity timeout and close client's con…
Browse files Browse the repository at this point in the history
…nection with pending ops, unless client isn't unloading / reading data. This change is primarily to fix fsck and possibly other similar "admin" RPCs that can take significant amount of time to execute.
  • Loading branch information
mikeov committed Mar 17, 2016
1 parent b89b54f commit 9f6b488
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cc/meta/ClientSM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,12 @@ ClientSM::HandleRequestSelf(int code, void *data)
}
// Fall through.
case EVENT_INACTIVITY_TIMEOUT:
if (EVENT_INACTIVITY_TIMEOUT == code && 0 < mPendingOpsCount &&
! mNetConnection->IsWriteReady()) {
// Ops pending, do not close connection, unless the client
// isn't unloading / reading the data.
break;
}
KFS_LOG_STREAM_DEBUG << PeerName(mNetConnection) <<
" closing connection " <<
(code == EVENT_INACTIVITY_TIMEOUT ?
Expand Down

0 comments on commit 9f6b488

Please sign in to comment.