From: Jason Dillaman Date: Tue, 24 May 2016 02:21:33 +0000 (-0400) Subject: journal: eliminate watch delay for object refetches X-Git-Tag: v11.0.0~428^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d7b511b854c8ab633dcdb1c935014218b83f4e09;p=ceph.git journal: eliminate watch delay for object refetches 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 --- diff --git a/src/journal/JournalPlayer.cc b/src/journal/JournalPlayer.cc index 66cd7afce894..a79b2d484f77 100644 --- a/src/journal/JournalPlayer.cc +++ b/src/journal/JournalPlayer.cc @@ -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) {