]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-replay: Print "Still waiting for" more judiciously
authorAdam Crume <adamcrume@gmail.com>
Fri, 18 Jul 2014 20:49:15 +0000 (13:49 -0700)
committerAdam Crume <adamcrume@gmail.com>
Wed, 13 Aug 2014 20:58:16 +0000 (13:58 -0700)
Signed-off-by: Adam Crume <adamcrume@gmail.com>
src/rbd_replay/Replayer.cc

index 86741ae3fe2386463b3582c416e74d18c36e55ff..f85d569ce573b110acac91d560664956e1ecf2fe 100644 (file)
@@ -227,10 +227,14 @@ void Replayer::wait_for_actions(const vector<dependency_d> &deps) {
     dout(DEPGRAPH_LEVEL) << "Waiting for " << dep.id << dendl;
     boost::system_time start_time(boost::get_system_time());
     boost::shared_lock<boost::shared_mutex> 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();