Skip to content
Snippets Groups Projects
user avatar
Vladimir Davydov authored
To ease recovery, vy_recovery_iterate() iterates over slices of the same
range in the chronological order. It is easy to do, because we always
log slices of the same range in the chronological order, as there can't
be concurrent dump and compaction of the same range. However, this will
not hold when the single memory level is introduced: a dump, which adds
new slices to all ranges, may occur while compaction is in progress so
that when compaction is finished a record corresponding to the slice
created by compaction will appear after the slice created by dump,
although the latter is newer. To prevent this from breaking the
assumption made by iterators that newer slices are closer to the head of
vy_range->slices list, let's sort the list on recovery/join.
3a6c2ff3
History
Name Last commit Last update