]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
journal: eliminate watch delay for object refetches
authorJason Dillaman <dillaman@redhat.com>
Tue, 24 May 2016 02:21:33 +0000 (22:21 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 24 May 2016 17:22:52 +0000 (13:22 -0400)
The randomized write sizes of the modified rbd-mirror stress
test results in a lot of journal object with few entries.
Immediately fetch objects when performing a refetch check prior
to closing an empty object.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/journal/JournalPlayer.cc

index 66cd7afce8943fd575c637202d0f9cae19d785d3..a79b2d484f773190ad51f0b27cf11ccf414def55 100644 (file)
@@ -654,6 +654,8 @@ void JournalPlayer::schedule_watch() {
     return;
   }
 
+  double watch_interval = m_watch_interval;
+
   ObjectPlayerPtr object_player = get_object_player();
   switch (m_watch_step) {
   case WATCH_STEP_FETCH_CURRENT:
@@ -668,11 +670,13 @@ void JournalPlayer::schedule_watch() {
                          << object_player->get_oid()
                          << dendl;
         object_player->clear_refetch_required();
+        watch_interval = 0;
       }
     }
     break;
   case WATCH_STEP_FETCH_FIRST:
     object_player = m_object_players.begin()->second.begin()->second;
+    watch_interval = 0;
     break;
   default:
     assert(false);
@@ -681,7 +685,7 @@ void JournalPlayer::schedule_watch() {
   ldout(m_cct, 20) << __func__ << ": scheduling watch on "
                    << object_player->get_oid() << dendl;
   C_Watch *ctx = new C_Watch(this, object_player->get_object_number());
-  object_player->watch(ctx, m_watch_interval);
+  object_player->watch(ctx, watch_interval);
 }
 
 void JournalPlayer::handle_watch(uint64_t object_num, int r) {