From: dongdong tao Date: Fri, 30 Mar 2018 15:30:55 +0000 (+0800) Subject: mds: fix unhealth heartbeat during rejoin X-Git-Tag: v12.2.6~150^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a942cc479c0df10cefe08d1eefac8bee20a39a2e;p=ceph.git mds: fix unhealth heartbeat during rejoin function process_imported_caps might hold mds_lock too long, mds tick thread will be starved, and leads to unhealth heartbeat check. which would eventually make the mds been kicked by the monitor during rejoin phase. Fixes: https://tracker.ceph.com/issues/23530 Signed-off-by: dongdong tao (cherry picked from commit 8539a9827ba86c44a5285925923a16b8764a6a0a) --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index e954c8912a57..e6be1c524180 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -5275,6 +5275,8 @@ bool MDCache::process_imported_caps() cap_imports_num_opening++; dout(10) << " opening missing ino " << p->first << dendl; open_ino(p->first, (int64_t)-1, new C_MDC_RejoinOpenInoFinish(this, p->first), false); + if (!(cap_imports_num_opening % 1000)) + mds->heartbeat_reset(); } if (cap_imports_num_opening > 0)