From 0129841f68fd1fe63fce47f3250035bf6d17b5ed Mon Sep 17 00:00:00 2001 From: Adam Crume Date: Fri, 18 Jul 2014 13:49:15 -0700 Subject: [PATCH] rbd-replay: Print "Still waiting for" more judiciously Signed-off-by: Adam Crume --- src/rbd_replay/Replayer.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rbd_replay/Replayer.cc b/src/rbd_replay/Replayer.cc index 86741ae3fe238..f85d569ce573b 100644 --- a/src/rbd_replay/Replayer.cc +++ b/src/rbd_replay/Replayer.cc @@ -227,10 +227,14 @@ void Replayer::wait_for_actions(const vector &deps) { dout(DEPGRAPH_LEVEL) << "Waiting for " << dep.id << dendl; boost::system_time start_time(boost::get_system_time()); boost::shared_lock lock(m_actions_complete_mutex); + bool first_time = true; while (!_is_action_complete(dep.id)) { //m_actions_complete_condition.wait(lock); + if (!first_time) { + dout(DEPGRAPH_LEVEL) << "Still waiting for " << dep.id << dendl; + } m_actions_complete_condition.timed_wait(lock, boost::posix_time::seconds(1)); - dout(DEPGRAPH_LEVEL) << "Still waiting for " << dep.id << dendl; + first_time = false; } boost::system_time action_completed_time(m_actions_complete[dep.id]); lock.unlock(); -- 2.39.5