]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: add heartbeat_reset() in start_files_to_reover() to avoid timedout issue 42061/head
authorYongseok Oh <yongseok.oh@linecorp.com>
Mon, 17 May 2021 05:11:50 +0000 (05:11 +0000)
committerPatrick Donnelly <pdonnell@redhat.com>
Mon, 28 Jun 2021 19:33:20 +0000 (12:33 -0700)
Signed-off-by: Yongseok Oh <yongseok.oh@linecorp.com>
(cherry picked from commit f43f1d85cf162a3204cd42af620303067c9d162f)

src/mds/MDCache.cc

index 37a36179fd62300c33ff7aa1bb09721dd4f21988..714b8d094aebf94c3f6ae689c1f8ff2b470dc3c2 100644 (file)
@@ -6362,14 +6362,19 @@ void MDCache::identify_files_to_recover()
 
 void MDCache::start_files_to_recover()
 {
+  int count = 0;
   for (CInode *in : rejoin_check_q) {
     if (in->filelock.get_state() == LOCK_XLOCKSNAP)
       mds->locker->issue_caps(in);
     mds->locker->check_inode_max_size(in);
+    if (!(++count % 1000))
+      mds->heartbeat_reset();
   }
   rejoin_check_q.clear();
   for (CInode *in : rejoin_recover_q) {
     mds->locker->file_recover(&in->filelock);
+    if (!(++count % 1000))
+      mds->heartbeat_reset();
   }
   if (!rejoin_recover_q.empty()) {
     rejoin_recover_q.clear();