diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 1d6107cebaa..34775139217 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -5610,6 +5610,8 @@ void MDCache::export_remaining_imported_caps() mds->send_message_client_counted(stale, q->first); } } + + mds->heartbeat_reset(); } for (map >::iterator p = cap_reconnect_waiters.begin(); diff --git a/src/mds/MDSRank.cc b/src/mds/MDSRank.cc index 4374c6349d2..6ebf5a5988b 100644 --- a/src/mds/MDSRank.cc +++ b/src/mds/MDSRank.cc @@ -487,6 +487,8 @@ bool MDSRank::_dispatch(Message *m, bool new_msg) dout(0) << "unrecognized message " << *m << dendl; return false; } + + heartbeat_reset(); } if (dispatch_depth > 1) diff --git a/src/mds/MDSRank.h b/src/mds/MDSRank.h index 2c2248e8191..c8749ff33a9 100644 --- a/src/mds/MDSRank.h +++ b/src/mds/MDSRank.h @@ -237,7 +237,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; @@ -308,6 +307,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