pub struct MigrationWatermark {
pub mvcc_format_version: u32,
pub watermark: HlcTimestamp,
}Expand description
Durable migration state for the legacy-to-HLC cut-over (spec section 8.4).
The database stores both fields. The format is always explicit; it is never inferred from byte length.
Fields§
§mvcc_format_version: u32Explicit MVCC storage format version (see Self::FORMAT_LEGACY_EPOCH
and Self::FORMAT_HLC).
watermark: HlcTimestampCut-over timestamp: all legacy epochs sort before it, all new HLC timestamps sort at or after it.
Implementations§
Source§impl MigrationWatermark
impl MigrationWatermark
Sourcepub const FORMAT_LEGACY_EPOCH: u32 = 1
pub const FORMAT_LEGACY_EPOCH: u32 = 1
mvcc_format_version while row versions carry
StoredVersionStamp::LegacyEpoch.
Sourcepub const FORMAT_HLC: u32 = 2
pub const FORMAT_HLC: u32 = 2
mvcc_format_version once row versions carry
StoredVersionStamp::Hlc.
Sourcepub fn cmp_stamps(a: &StoredVersionStamp, b: &StoredVersionStamp) -> Ordering
pub fn cmp_stamps(a: &StoredVersionStamp, b: &StoredVersionStamp) -> Ordering
Total order over stored version stamps during migration: legacy epochs order numerically among themselves, every legacy epoch sorts before every HLC timestamp, and HLC timestamps keep their natural order.
Sourcepub fn cmp_stamp_to_watermark(&self, stamp: &StoredVersionStamp) -> Ordering
pub fn cmp_stamp_to_watermark(&self, stamp: &StoredVersionStamp) -> Ordering
How a stamp orders against the watermark: every legacy epoch sorts
before it; HLC timestamps sort at or after it (a pre-watermark HLC
timestamp cannot occur once the watermark is enforced, so it clamps to
Ordering::Equal).
Trait Implementations§
Source§impl Clone for MigrationWatermark
impl Clone for MigrationWatermark
Source§fn clone(&self) -> MigrationWatermark
fn clone(&self) -> MigrationWatermark
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more