]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PGLog: allow for empty pg log in update_range if log_tail == eversion_t() 2982/head
authorSamuel Just <sam.just@inktank.com>
Mon, 9 Dec 2013 17:09:45 +0000 (09:09 -0800)
committerSamuel Just <sjust@redhat.com>
Sat, 22 Nov 2014 00:15:51 +0000 (16:15 -0800)
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 03c5344f74991ec351cdc8a55f6495d496479091)

Fixes: 10168
src/osd/ReplicatedPG.cc

index ff20ceb7b4d628e8a70a2ab6c9d7f7fce461d505..772c5836748c7f1b47fd804f22db90ace58614bf 100644 (file)
@@ -7570,6 +7570,16 @@ void ReplicatedPG::update_range(
     dout(10) << __func__<< ": bi is current " << dendl;
     assert(bi->version == info.last_update);
   } else if (bi->version >= info.log_tail) {
+    if (pg_log.get_log().empty()) {
+      /* Because we don't move log_tail on split, the log might be
+       * empty even if log_tail != last_update.  However, the only
+       * way to get here with an empty log is if log_tail is actually
+       * eversion_t(), because otherwise the entry which changed
+       * last_update since the last scan would have to be present.
+       */
+      assert(bi->version == eversion_t());
+      return;
+    }
     assert(!pg_log.get_log().empty());
     dout(10) << __func__<< ": bi is old, (" << bi->version
             << ") can be updated with log" << dendl;