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: v12.0.1~73^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=85071f1509beba4a390730e6a3a4332484646d63;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 --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index db750025ee81..45cd9cfb7bd1 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -5606,6 +5606,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 190592eabf5d..6f5cf1030959 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