Skip to content

Commit

Permalink
mds: reset heartbeat in export_remaining_imported_caps
Browse files Browse the repository at this point in the history
This loop can be very long.

Fixes: http://tracker.ceph.com/issues/19118
Signed-off-by: John Spray <john.spray@redhat.com>
  • Loading branch information
John Spray committed Mar 6, 2017
1 parent 8193945 commit 85071f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/mds/MDCache.cc
Expand Up @@ -5606,6 +5606,8 @@ void MDCache::export_remaining_imported_caps()
mds->send_message_client_counted(stale, q->first);
}
}

mds->heartbeat_reset();
}

for (map<inodeno_t, list<MDSInternalContextBase*> >::iterator p = cap_reconnect_waiters.begin();
Expand Down
7 changes: 6 additions & 1 deletion src/mds/MDSRank.h
Expand Up @@ -226,7 +226,6 @@ class MDSRank {
bool _dispatch(Message *m, bool new_msg);

ceph::heartbeat_handle_d *hb; // Heartbeat for threads using mds_lock
void heartbeat_reset();

bool is_stale_message(Message *m) const;

Expand Down Expand Up @@ -297,6 +296,12 @@ class MDSRank {
void respawn();
// <<<

/**
* Call this periodically if inside a potentially long running piece
* of code while holding the mds_lock
*/
void heartbeat_reset();

/**
* Report state DAMAGED to the mon, and then pass on to respawn(). Call
* this when an unrecoverable error is encountered while attempting
Expand Down

0 comments on commit 85071f1

Please sign in to comment.