Expand description
(ObjectID, checkpoint) -> version.
Resolves an object’s version as of a checkpoint: the version it
had at the end of the most recent checkpoint, at or before the one
queried, in which it changed. One row is written per
(object, checkpoint-it-changed-in), carrying the object’s final
version in that checkpoint – a live version, or the tombstone
version at which it was deleted or wrapped.
The key is the 32-byte object id followed by an 8-byte big-endian
checkpoint, so a reverse prefix scan from (id, C) lands on the
greatest checkpoint <= C – the object’s state as of C. This is
the checkpoint-pinned counterpart to the version-keyed
super::objects CF (which answers “object at version V” but not
“object as of checkpoint C”), and the analog of the indexer’s
Postgres obj_versions table that the GraphQL service relies on
for checkpoint_viewed_at historical reads.
Rows carry a from_restore provenance flag, set only by the
live-set restore at the anchor checkpoint and left unset by tip
indexing and backfill. It lets a read whose checkpoint falls before
any recorded change fall back to the restore floor – telling an
object that existed before the available window (and so is live at
the queried checkpoint) apart from one created later. See
get_object_version_at_checkpoint.
Pruning is effects-driven, in lockstep with super::objects: a
transaction that supersedes an object retracts that object’s
checkpoint-pinned entries below the superseding checkpoint, so the
retained set always matches the versions super::objects keeps
(the floor at the retention boundary, and everything newer).
Structs§
- Key
(ObjectID, checkpoint). Encoded as 32 raw id bytes followed by an 8-byte big-endian checkpoint sequence number, so the rows for one object cluster together in ascending checkpoint order and a reverse scan resolves the floor checkpoint for a point-in-time read.- Object
IdPrefix - Prefix encoder for “every checkpoint at which
idchanged”. Encodes as the 32 raw id bytes – the leading bytes of everyKeywhoseidmatches.
Constants§
Functions§
- options
- store
- Build the
(Key, Value)pair recording that, as ofcheckpoint, the objectid’s final version wasversion. Written by tip indexing and backfill;from_restoreis left unset so these (the common case) pay no extra bytes. - store_
restored - Like
store, but marks the row as written by the live-set restore at the anchor checkpoint (from_restore = Some(true)). The checkpoint-pinned read uses this flag to tell a static object’s restore floor (the object existed before the available window) apart from an object created in the anchor checkpoint.
Type Aliases§
- Value
- The object’s final version in the keyed checkpoint, plus a
from_restoreprovenance flag (set only on rows written by the live-set restore at the anchor checkpoint).