]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: reset heartbeat in each MDSContext complete() 44246/head
authorXiubo Li <xiubli@redhat.com>
Thu, 9 Dec 2021 02:12:31 +0000 (10:12 +0800)
committerYongseok Oh <yongseok.oh@linecorp.com>
Mon, 13 Dec 2021 14:58:03 +0000 (14:58 +0000)
Before we switching the mds_lock to a fair mutex, the Finisher could
always successfully acquire the mds_lock if there has a number of
contextes finished. So it may take a long time to finish and will
delay kicking the heartbeat.

While even we have fix the mds_lock issue, it may still will happen
in case the complete() itself will take a long time to finish or
there has a number of contextes keep comming, which could make the
Finisher thread keep running.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/mds/MDSContext.cc

index fcf6f764fe4c1cf2538a9f89b547f475eca953d6..210c836b1fca821d1ae972b7b6650983341e665e 100644 (file)
@@ -26,6 +26,7 @@ void MDSContext::complete(int r) {
   ceph_assert(mds != nullptr);
   ceph_assert(ceph_mutex_is_locked_by_me(mds->mds_lock));
   dout(10) << "MDSContext::complete: " << typeid(*this).name() << dendl;
+  mds->heartbeat_reset();
   return Context::complete(r);
 }