Skip to main content

OracleConfig

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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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

§

fn clone(&self) -> OracleConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Copy for OracleConfig

§

impl Debug for OracleConfig

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl Default for OracleConfig

§

fn default() -> OracleConfig

Returns the “default value” for a type. Read more
§

impl Eq for OracleConfig

§

impl PartialEq for OracleConfig

§

fn eq(&self, other: &OracleConfig) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
§

impl StructuralPartialEq for OracleConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.