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>
) {
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();
}