From 7281638d4a9a54cb4f979918e688c9fc9961a4c8 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 10 Sep 2014 22:51:20 -0700 Subject: [PATCH] mds: sleep in progress thread if laggy and waiting_for_nolaggy waiters If we have nolaggy waiters but are laggy we want to sleep. Otherwise, we will just spin and spam the log ... Signed-off-by: Sage Weil --- src/mds/MDS.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mds/MDS.cc b/src/mds/MDS.cc index 1247c5771a82b..d797b3df2ae57 100644 --- a/src/mds/MDS.cc +++ b/src/mds/MDS.cc @@ -2390,7 +2390,9 @@ void *MDS::ProgressThread::entry() { Mutex::Locker l(mds->mds_lock); while (true) { - while (!stopping && (mds->finished_queue.empty() && mds->waiting_for_nolaggy.empty())) { + while (!stopping && + mds->finished_queue.empty() && + (mds->waiting_for_nolaggy.empty() || mds->beacon.is_laggy())) { cond.Wait(mds->mds_lock); } -- 2.39.5