From: Xiubo Li Date: Thu, 9 Dec 2021 02:12:31 +0000 (+0800) Subject: mds: reset heartbeat in each MDSContext complete() X-Git-Tag: v16.2.8~65^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c1bb068a657535172f5b33d9891ca9f1e1dd4b8b;p=ceph.git mds: reset heartbeat in each MDSContext complete() 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 (cherry picked from commit 9f7110501fd5989aecd575815c87c071fee76b93) --- diff --git a/src/mds/MDSContext.cc b/src/mds/MDSContext.cc index fcf6f764fe4..210c836b1fc 100644 --- a/src/mds/MDSContext.cc +++ b/src/mds/MDSContext.cc @@ -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); }