Enum OracleConfig
#[non_exhaustive]pub enum OracleConfig {
Centralised,
}Expand description
How timestamps are handed out.
One strategy, deliberately. Two others are described in the literature and were the obvious next steps; both turned out to conflict with the completion ring that computes the read watermark, and neither is offered as a setting that silently does nothing.
Batched — each thread claims a block of stride timestamps with one
fetch_add and hands them out locally. It cannot work here: the ring needs
commit timestamps to be dense, and a reserved-but-unused timestamp is an
permanent hole. Tried as an experiment, it did not merely run slowly, it
deadlocked — every committer blocked waiting for a watermark that could
never advance. Making it work needs the watermark to track reserved ranges,
at which point an idle thread holding a block freezes every snapshot in the
system.
Epoch (Silo-style) — a global epoch advances on a timer and transactions are ordered between epochs but not within one, which removes the shared counter from the commit path entirely. The obstacle is not the counter but the two things built on top of it here: visibility would lag by up to an epoch, so “commit, then read it back” would stop working without an extra wait; and SSI revalidates read sets against the read watermark, which would no longer be able to see same-epoch commits. It remains the right answer for a much larger machine.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Centralised
One global atomic counter for commit timestamps.
Exact and totally ordered, and now a bare fetch_add with no lock
behind it. The counter is still a shared cache line, but measurement put
the watermark’s compare-exchange well ahead of it as the write path’s
cost — see Oracle::publish.
Trait Implementations§
§impl Clone for OracleConfig
impl Clone for OracleConfig
§fn clone(&self) -> OracleConfig
fn clone(&self) -> OracleConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more