From: John Spray Date: Mon, 6 Mar 2017 11:51:31 +0000 (+0000) Subject: mds: reset heartbeat in export_remaining_imported_caps X-Git-Tag: v11.2.1~135^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F14572%2Fhead;p=ceph.git mds: reset heartbeat in export_remaining_imported_caps This loop can be very long. Fixes: http://tracker.ceph.com/issues/19118 Signed-off-by: John Spray (cherry picked from commit 85071f1509beba4a390730e6a3a4332484646d63) --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index e33424afd56..26adfcf053e 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.h b/src/mds/MDSRank.h index 190592eabf5..6f5cf103095 100644 --- a/src/mds/MDSRank.h +++ b/src/mds/MDSRank.h @@ -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; @@ -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