DVSchemaEvolution class final

One expand/contract in progress.

Constructors

DVSchemaEvolution.expand({required String id, required String release, required DateTime at, required int expandProtocol, Duration verificationWindow = const Duration(hours: 1)})
Starts an expand/contract: release ran the expand at at.
factory
DVSchemaEvolution.fromJson(Map<String, Object?> json)
Reads a saved state. A state saved before verification and the read switch were recorded reads as neither: verified again, not assumed.
factory

Properties

discrepancies → int
Dual-write discrepancies recorded so far.
no setter
expandProtocol → int
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
final
oldShapeDropped → bool
no setter
phase → DVSchemaPhase
no setter
readsSwitched → bool
A release has moved reads to the new shape.
no setter
releasePhase → DVReleaseMigrationPhase
Where this migration stands in Backend Release Management's terms, which its rollback planner reads to decide what a rollback can restore.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
verificationWindow → Duration
final
verified → bool
Every chunk agreed for the whole window, and no discrepancy has been recorded since.
no setter

Methods

advance({required String release, required DateTime now, DVBackfillProgress? progress, Set<int>? clientProtocols}) → DVSchemaPhaseResult
Moves to the next phase in release, if its gate allows.
dropOldShape({required String release, required Set<int>? clientProtocols}) → DVSchemaPhaseResult
Drops the old shape, in a release after the one that contracted.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recordDiscrepancy(DateTime at) → void
A write that reached one shape and not the other, seen at at. It takes verification away: the counter has to stay at zero for a whole window again before reads may move.
recordFindings(Iterable<DVSchemaFinding> findings, DateTime at) → void
Records every DV-SCHEMA-007 among findings as a discrepancy at at.
switchReads({required String release, required DVBackfillProgress? progress}) → DVSchemaPhaseResult
Moves reads to the new shape in release, once verified. Both shapes are still written, so the old one stays current for any release that reads it. progress is checked again: a chunk that has since stopped matching refuses the switch.
toJson() → Map<String, Object?>
toString() → String
A string representation of this object.
inherited
verify({required DateTime now, required DVBackfillProgress? progress}) → DVSchemaPhaseResult
Records that the backfill verifies: every chunk backfilled, every chunk verified, and no dual-write discrepancy for the whole window since the verify phase began. Not a deploy, so it names no release.

Operators

operator ==(Object other) → bool
The equality operator.
inherited