]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PGLog: don't move up log.tail
authorSamuel Just <sam.just@inktank.com>
Sat, 7 Dec 2013 21:19:49 +0000 (13:19 -0800)
committerSamuel Just <sam.just@inktank.com>
Wed, 22 Jan 2014 22:38:25 +0000 (14:38 -0800)
Moving up log.tail unnecessarily risks backfilling
a replica after a split.  Also, it disrupts the
property that replicas from the most recent interval
which performed writes must have overlapping logs.

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PGLog.cc

index 9f6ca1f70c3bcbd8c4aa5a5c182b2a677049e66d..f9a6b97b94d0546c613c52e68efef6c00d9bc290 100644 (file)
@@ -40,22 +40,12 @@ void PGLog::IndexedLog::split_into(
        ) {
     if ((i->soid.hash & mask) == child_pgid.m_seed) {
       olog->log.push_back(*i);
-      if (log.empty())
-       tail = i->version;
     } else {
       log.push_back(*i);
-      if (olog->empty())
-       olog->tail = i->version;
     }
     oldlog.erase(i++);
   }
 
-  if (log.empty())
-    tail = head;
-
-  if (olog->empty())
-    olog->tail = olog->head;
-
   olog->index();
   index();
 }