feat: add consistency high water mark to segment
@@ -109,6 +109,16 @@ table Segment {
id: uint64;
// the writer id of the server that persisted this segment
writer_id: uint32;
+ // this is the clock value that the writer has verified with its peers that
+ // entries are ordered and consistent up to. If the writer has no peers this
+ // value will just be the clock value for the last sequenced entry in this segment.
+ // This value could be lower than the first clock value in the segment if a
+ // consistency check has not occured since this segment was started. Or, if
+ // a consistency check has occured in a segment following this one, but before
+ // this segment has been persisted, the clock value could be higher than the last
+ // entry in the segment. This latter condition indicates that all entries in the
+ // segment are properly ordered and consistent with other write buffer peers.
+ consistency_high_water_clock: uint64;
// the raw entry data along with their sequence numbers
entries: [SequencedEntry];
}
