Table of Contents

Class SnapshotExpiredException

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Thrown when a read is attempted at a snapshot whose revisions have already been reclaimed by cleanup.

public class SnapshotExpiredException : TyphonException, ISerializable
Inheritance
SnapshotExpiredException
Implements
Inherited Members

Remarks

Raised by PointInTimeAccessor reads of Versioned components. A PTA obtains a TSN but registers nothing in the transaction chain, so the cleanup that decides how far back revisions must be kept cannot see it and is free to trim below a live snapshot. Before this existed, such a read returned an all-zero component — wrong data, indistinguishable at the call site from legitimately-zero data (#672).

The accessor is not given real retention deliberately. Retention means chains stop being trimmed while a snapshot is live, and RevisionChainReader.TryWalkSingleEntryOptimistic — the lock-free fast path for every Versioned read in the engine — is predicated on chains being one entry long. That would hand any caller a way to silently degrade MVCC read performance engine-wide by holding an accessor too long, or leaking one. Failing fast is the cheaper and safer contract.

A caller that needs a snapshot to survive concurrent commits should use a read-only Transaction, which registers in the chain and is therefore visible to cleanup.

Constructors

SnapshotExpiredException(long, long)

Creates a new SnapshotExpiredException naming the snapshot and the watermark that overtook it.

public SnapshotExpiredException(long snapshotTsn, long retainedMinTsn)

Parameters

snapshotTsn long

The TSN the read was attempted at.

retainedMinTsn long

The oldest TSN whose revisions are still guaranteed to be retained.

Properties

RetainedMinTsn

The oldest TSN whose revisions are still guaranteed to be retained.

public long RetainedMinTsn { get; }

Property Value

long

SnapshotTsn

The TSN the read was attempted at.

public long SnapshotTsn { get; }

Property Value

long