]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix unhealth heartbeat during rejoin 21144/head
authordongdong tao <tdd21151186@gmail.com>
Fri, 30 Mar 2018 15:30:55 +0000 (23:30 +0800)
committerdongdong tao <tdd21151186@gmail.com>
Thu, 5 Apr 2018 03:51:41 +0000 (11:51 +0800)
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 <tdd21151186@gmail.com>
src/mds/MDCache.cc

index de600c84f02bb87146d49a9967b4a2b4c8cbaec6..af2c99debd9416e865fa375819216e26606cc75c 100644 (file)
@@ -5310,6 +5310,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)