src/scan/Snapshot.bend checks
raw source on the hub · import mylsm-lsm-store@0.6.0.2/src/scan/Snapshot.bend as Snapshot
2 imports
import Base import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
Types
type Decision source · line 5 · raw
Data
Reports whether the requested snapshot fits the retained-resource limits.
Retained@snapshot_count:Nat -> @retained_bytes:Nat -> Decision
ResourceLimitDecision
type Registry source · line 10 · raw
Data
Holds the aggregate reservation counters for one database owner.
Registry@snapshot_count:Nat -> @retained_bytes:Nat -> Registry
type RegistryDecision source · line 14 · raw
Data
Returns the updated registry or its unchanged prior state after rejection.
Admitted@registry:Registry -> RegistryDecision
Rejected@registry:Registry -> RegistryDecision
type RegistryReleaseDecision source · line 19 · raw
Data
Reports a snapshot release or preserves the registry on invalid release.
Released@registry:Registry -> RegistryReleaseDecision
InvalidRelease@registry:Registry -> RegistryReleaseDecision
type SnapshotCloseDecision source · line 24 · raw
Data
Couples snapshot closure to child checks and aggregate reservation release.
SnapshotClosed@registry:Registry -> SnapshotCloseDecision
SnapshotBusy@registry:Registry -> SnapshotCloseDecision
InvalidSnapshotClose@registry:Registry -> SnapshotCloseDecision
type Lifecycle source · line 30 · raw
Data
Tracks whether a snapshot is open and how many cursors still reference it.
Live@cursor_count:Nat -> Lifecycle
ClosedLifecycle
type LifecycleDecision source · line 35 · raw
Data
Reports a lifecycle transition, a live-child conflict, or an invalid action.
Advanced@lifecycle:Lifecycle -> LifecycleDecision
BusyLifecycleDecision
InvalidLifecycleDecision
type GenerationDecision source · line 41 · raw
Data
Reports a published generation and whether its predecessor remains retained.
Published@current:Nat -> @retired:RetiredGeneration -> GenerationDecision
type RetiredGeneration source · line 45 · raw
Data
Represents one older SST generation while snapshots still reference it.
NoRetainedRetiredGeneration
GenerationRetained@generation:Nat -> @bytes:Nat -> @references:Nat -> RetiredGeneration
type RetentionDecision source · line 50 · raw
Data
Reports whether releasing a generation reference keeps or reclaims its files.
Keep@generation:Nat -> @bytes:Nat -> @references:Nat -> RetentionDecision
Reclaim@generation:Nat -> @bytes:Nat -> RetentionDecision
InvalidReferenceRetentionDecision
type FileGeneration source · line 56 · raw
Data
Tracks one published SST generation and its live reader references.
FileGeneration@id:Nat -> @size:Nat -> @references:Nat -> FileGeneration
type GenerationRegistry source · line 60 · raw
Data
Keeps the current generation separate from all reader-retained generations.
GenerationRegistry@current:FileGeneration -> @retired:List<&2, FileGeneration> -> GenerationRegistry
type GenerationPinDecision source · line 65 · raw
Data
Reports a successful generation pin or preserves the registry on a missing identifier.
Pinned@registry:GenerationRegistry -> GenerationPinDecision
MissingGeneration@registry:GenerationRegistry -> GenerationPinDecision
type RetiredPin source · line 70 · raw
Data
Reports an incremented reader count for a located retired generation.
RetiredPinned@retired:List<&2, FileGeneration> -> RetiredPin
RetiredPinMissing@retired:List<&2, FileGeneration> -> RetiredPin
type RetiredRelease source · line 75 · raw
Data
Reports a retained, reclaimed, or missing retired generation during release.
RetiredReleased@retired:List<&2, FileGeneration> -> RetiredRelease
RetiredReclaimed@retired:List<&2, FileGeneration> -> @number:Nat -> @bytes:Nat -> RetiredRelease
RetiredMissing@retired:List<&2, FileGeneration> -> RetiredRelease
type GenerationReleaseDecision source · line 81 · raw
Data
Reports a decremented reference or identifies files reclaimed after the last reader.
GenerationReleased@registry:GenerationRegistry -> GenerationReleaseDecision
GenerationReclaimed@registry:GenerationRegistry -> @number:Nat -> @bytes:Nat -> GenerationReleaseDecision
MissingReference@registry:GenerationRegistry -> GenerationReleaseDecision
type ResourceIdAllocator source · line 87 · raw
Data
Carries the next owner resource identifier and terminal exhaustion state.
ResourceIdAllocator@next_id:U32 -> @exhausted:Bool -> ResourceIdAllocator
type ResourceIdDecision source · line 91 · raw
Data
Reports an allocated owner identifier or preserves an exhausted allocator.
ResourceIdAllocated@id:U32 -> @allocator:ResourceIdAllocator -> ResourceIdDecision
ResourceIdExhausted@allocator:ResourceIdAllocator -> ResourceIdDecision
type SnapshotResource source · line 96 · raw
Data
Associates each owner-managed snapshot identifier with its generation and children.
SnapshotResource@id:U32 -> @generation:Nat -> @retained_bytes:Nat -> @cursor_count:Nat -> SnapshotResource
type CursorResource source · line 101 · raw
Data
Identifies one owner-managed cursor and its parent snapshot.
CursorResource@id:U32 -> @snapshot_id:U32 -> CursorResource
type OwnerRegistry source · line 105 · raw
Data
Holds aggregate snapshot reservations and their owner-issued identifiers.
OwnerRegistry@allocator:ResourceIdAllocator -> @reservations:Registry -> @snapshots:List<&2, SnapshotResource> -> @cursors:List<&2, CursorResource> -> OwnerRegistry
type OwnerOpenDecision source · line 110 · raw
Data
Reports an admitted owner snapshot or the exact registry after rejection.
OwnerSnapshotOpened@registry:OwnerRegistry -> @snapshot_id:U32 -> OwnerOpenDecision
OwnerSnapshotRejected@registry:OwnerRegistry -> OwnerOpenDecision
type OwnerCursorOpenDecision source · line 115 · raw
Data
Reports a cursor acquisition or the unchanged owner registry on rejection.
OwnerCursorOpened@registry:OwnerRegistry -> @cursor_id:U32 -> OwnerCursorOpenDecision
OwnerCursorRejected@registry:OwnerRegistry -> OwnerCursorOpenDecision
type CursorListRemoveDecision source · line 120 · raw
Data
Reports cursor removal with enough context to restore it after invalid release.
CursorListRemoved@prefix:List<&2, CursorResource> -> @resource:CursorResource -> @tail:List<&2, CursorResource> -> CursorListRemoveDecision
CursorListMissing@cursors:List<&2, CursorResource> -> CursorListRemoveDecision
type CursorListRemoveState source · line 127 · raw
Type
Carries the recursive cursor-ID search with its untouched list prefix.
CursorSearch@cursors:List<&2, CursorResource> -> @cursor_id:U32 -> @prefix:List<&2, CursorResource> -> CursorListRemoveState
CursorCompareCopies@copies:Pair(CursorResource, CursorResource) -> @tail:List<&2, CursorResource> -> @cursor_ids:Pair(U32, U32) -> @prefix:List<&2, CursorResource> -> CursorListRemoveState
CursorCompare@matches:Bool -> @resource:CursorResource -> @tail:List<&2, CursorResource> -> @cursor_id:U32 -> @prefix:List<&2, CursorResource> -> CursorListRemoveState
type OwnerCursorCloseDecision source · line 138 · raw
Data
Reports cursor closure or preserves owner accounting on invalid release.
OwnerCursorClosed@registry:OwnerRegistry -> @snapshot_id:U32 -> OwnerCursorCloseDecision
OwnerCursorCloseRejected@registry:OwnerRegistry -> OwnerCursorCloseDecision
type OwnerSnapshotCloseDecision source · line 143 · raw
Data
Reports snapshot closure, live-child Busy, or unchanged registry rejection.
OwnerSnapshotClosed@registry:OwnerRegistry -> @resource:SnapshotResource -> OwnerSnapshotCloseDecision
OwnerSnapshotBusy@registry:OwnerRegistry -> OwnerSnapshotCloseDecision
OwnerSnapshotCloseRejected@registry:OwnerRegistry -> OwnerSnapshotCloseDecision
type SnapshotListCursorDecision source · line 149 · raw
Data
Reports replacement of one snapshot's cursor count in the owner registry.
SnapshotListUpdated@snapshots:List<&2, SnapshotResource> -> SnapshotListCursorDecision
SnapshotListRejected@snapshots:List<&2, SnapshotResource> -> SnapshotListCursorDecision
SnapshotListClosed@prefix:List<&2, SnapshotResource> -> @resource:SnapshotResource -> @tail:List<&2, SnapshotResource> -> SnapshotListCursorDecision
SnapshotListBusy@snapshots:List<&2, SnapshotResource> -> SnapshotListCursorDecision
type SnapshotCursorAction source · line 157 · raw
Data
Selects whether a snapshot child reference is acquired or released.
SnapshotCursorAcquire@max_cursors:Nat -> SnapshotCursorAction
SnapshotCursorReleaseSnapshotCursorAction
SnapshotCursorCloseSnapshotCursorAction
type SnapshotListCursorState source · line 163 · raw
Type
Carries the recursive snapshot lookup without losing the original list prefix.
SnapshotCursorSearch@snapshots:List<&2, SnapshotResource> -> @snapshot_id:U32 -> @action:SnapshotCursorAction -> @prefix:List<&2, SnapshotResource> -> SnapshotListCursorState
SnapshotCursorCompareCopies@copies:Pair(SnapshotResource, SnapshotResource) -> @tail:List<&2, SnapshotResource> -> @snapshot_ids:Pair(U32, U32) -> @action:SnapshotCursorAction -> @prefix:List<&2, SnapshotResource> -> SnapshotListCursorState
SnapshotCursorCompare@matches:Bool -> @resource:SnapshotResource -> @tail:List<&2, SnapshotResource> -> @snapshot_id:U32 -> @action:SnapshotCursorAction -> @prefix:List<&2, SnapshotResource> -> SnapshotListCursorState
type SnapshotCursorDecision source · line 176 · raw
Data
Reports a snapshot cursor-reference update or preserves its prior resource.
SnapshotCursorAcquired@resource:SnapshotResource -> SnapshotCursorDecision
SnapshotCursorLimit@resource:SnapshotResource -> SnapshotCursorDecision
SnapshotCursorReleased@resource:SnapshotResource -> SnapshotCursorDecision
SnapshotCursorUnderflow@resource:SnapshotResource -> SnapshotCursorDecision
Definitions
def point_read.matches source · line 182 · raw
@order:Cmp -> Bool
def nat.duplicate.go source · line 189 · raw
@value:Nat -> @first:Nat -> @second:Nat -> Pair(Nat, Nat)
def nat.duplicate source · line 195 · raw
@value:Nat -> Pair(Nat, Nat)
def allocate_resource_id.maximum source · line 198 · raw
@next_ids:Pair(U32, U32) -> @at_max:Bool -> ResourceIdDecision
def u32.bytes source · line 212 · raw
@value:U32 -> 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes
def u32.clone.pair.results source · line 215 · raw
@results:Pair(Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, Maybe<&2, U32>), Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, Maybe<&2, U32>)) -> Pair(U32, U32)
def u32.clone.pair.bytes source · line 222 · raw
@bytes:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes) -> Pair(U32, U32)
def u32.clone.pair.buffers source · line 228 · raw
@+len:U32 -> @buffers:Pair(Array<U32>, Array<U32>) -> Pair(U32, U32)
def u32.duplicate.encoded source · line 236 · raw
@bytes:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> Pair(U32, U32)
def u32.duplicate source · line 242 · raw
@value:U32 -> Pair(U32, U32)
def allocate_resource_id.at_limit source · line 245 · raw
@copies:Pair(U32, U32) -> @exhausted:Bool -> ResourceIdDecision
def allocate_resource_id source · line 259 · raw
@allocator:ResourceIdAllocator -> ResourceIdDecision
Allocates one nonrecycled owner resource identifier without integer wraparound.
def reserve.result source · line 267 · raw
@count:Nat -> @retained_bytes:Nat -> @admitted:Pair(Bool, Bool) -> Decision
Produces the updated reservation only when both bounds admit it.
def reserve.bytes source · line 279 · raw
@retained:Pair(Nat, Nat) -> @requested:Pair(Nat, Nat) -> @snapshot_count:Pair(Nat, Nat) -> @max_snapshots:Nat -> @max_retained_bytes:Nat -> Pair(Nat, Pair(Nat, Pair(Bool, Bool)))
Computes the updated retained-byte total and both admission checks.
def reserve.result.checked source · line 298 · raw
@pair:Pair(Nat, Pair(Nat, Pair(Bool, Bool))) -> Decision
Unpacks the reservation calculation into its public decision.
def reserve source · line 304 · raw
@snapshot_count:Nat -> @retained_bytes:Nat -> @requested_bytes:Nat -> @max_snapshots:Nat -> @max_retained_bytes:Nat -> Decision
Decides whether one snapshot fits the configured count and byte limits.
def registry.reserve.result source · line 316 · raw
@original:Registry -> @decision:Decision -> RegistryDecision
Preserves the prior registry when a reservation fails either configured bound.
def registry.reserve.input source · line 323 · raw
@copies:Pair(Pair(Nat, Nat), Pair(Nat, Nat)) -> @requested_bytes:Nat -> @max_snapshots:Nat -> @max_retained_bytes:Nat -> RegistryDecision
Applies a reservation decision while keeping a copy of the prior counters.
def registry.reserve.count source · line 336 · raw
@count_copies:Pair(Nat, Nat) -> @retained_bytes:Nat -> @requested_bytes:Nat -> @max_snapshots:Nat -> @max_retained_bytes:Nat -> RegistryDecision
Duplicates the byte counter so an admitted decision can update while rejection preserves it.
def registry.reserve source · line 350 · raw
@registry:Registry -> @requested_bytes:Nat -> @max_snapshots:Nat -> @max_retained_bytes:Nat -> RegistryDecision
Reserves one snapshot against the aggregate counters and preserves state on rejection.
def registry.release.result source · line 362 · raw
@counters:Pair(Nat, Nat) -> @original:Registry -> @admitted:Pair(Bool, Bool) -> RegistryReleaseDecision
Keeps the original counters when release preconditions do not hold.
def registry.release.input.bytes source · line 375 · raw
@count_copies:Pair(Nat, Nat) -> @count_original:Nat -> @bytes_copies:Pair(Nat, Nat) -> @bytes_original:Nat -> @release_copies:Pair(Nat, Nat) -> RegistryReleaseDecision
Separates byte arithmetic inputs so both admission checks retain their values.
def registry.release.input source · line 396 · raw
@copies:Pair(Pair(Nat, Nat), Pair(Nat, Nat)) -> @released_bytes:Nat -> RegistryReleaseDecision
Validates positive snapshot ownership and sufficient retained bytes before decrementing.
def registry.release.count source · line 407 · raw
@count_copies:Pair(Nat, Nat) -> @retained_bytes:Nat -> @released_bytes:Nat -> RegistryReleaseDecision
Duplicates the counters so invalid releases preserve the exact prior registry.
def registry.release source · line 418 · raw
@registry:Registry -> @released_bytes:Nat -> RegistryReleaseDecision
Releases one closed snapshot's reservation without changing active readers.
def owner.snapshot.open.release source · line 424 · raw
@allocator:ResourceIdAllocator -> @snapshots:List<&2, SnapshotResource> -> @cursors:List<&2, CursorResource> -> @decision:RegistryReleaseDecision -> OwnerOpenDecision
def owner.snapshot.open.created source · line 438 · raw
@ids:Pair(U32, U32) -> @allocator:ResourceIdAllocator -> @reservations:Registry -> @snapshots:List<&2, SnapshotResource> -> @cursors:List<&2, CursorResource> -> @generation:Nat -> @retained_bytes:Nat -> OwnerOpenDecision
def owner.snapshot.open.id source · line 454 · raw
@allocation:ResourceIdDecision -> @reservations:Registry -> @snapshots:List<&2, SnapshotResource> -> @cursors:List<&2, CursorResource> -> @generation:Nat -> @retained_bytes:Nat -> OwnerOpenDecision
def owner.snapshot.open.reserved source · line 470 · raw
@allocator:ResourceIdAllocator -> @snapshots:List<&2, SnapshotResource> -> @cursors:List<&2, CursorResource> -> @generation:Nat -> @requests:Pair(Nat, Nat) -> @decision:RegistryDecision -> OwnerOpenDecision
def owner.snapshot.open.budget source · line 488 · raw
@allocator:ResourceIdAllocator -> @snapshots:List<&2, SnapshotResource> -> @cursors:List<&2, CursorResource> -> @generation:Nat -> @requested_bytes:Pair(Nat, Nat) -> @release_bytes:Nat -> @limits:Pair(Nat, Nat) -> @reservations:Registry -> OwnerOpenDecision
def owner.snapshot.open.available source · line 507 · raw
@allocator:ResourceIdAllocator -> @reservations:Registry -> @snapshots:List<&2, SnapshotResource> -> @cursors:List<&2, CursorResource> -> @generation:Nat -> @requests:Pair(Nat, Nat) -> @limits:Pair(Nat, Nat) -> OwnerOpenDecision
def owner.snapshot.open source · line 529 · raw
@owner:OwnerRegistry -> @generation:Nat -> @requested_bytes:Nat -> @limits:Pair(Nat, Nat) -> OwnerOpenDecision
def snapshot.resource.duplicate.parts source · line 541 · raw
@ids:Pair(U32, U32) -> @generations:Pair(Nat, Nat) -> @retained:Pair(Nat, Nat) -> @cursors:Pair(Nat, Nat) -> Pair(SnapshotResource, SnapshotResource)
def snapshot.resource.duplicate source · line 559 · raw
@resource:SnapshotResource -> Pair(SnapshotResource, SnapshotResource)
def snapshot.resource.cursor.acquire.result source · line 566 · raw
@resource:SnapshotResource -> @admitted:Bool -> SnapshotCursorDecision
def snapshot.resource.cursor.acquire.checked source · line 578 · raw
@resource:SnapshotResource -> @cursor_count:Nat -> @max_cursors:Nat -> SnapshotCursorDecision
def snapshot.resource.cursor.acquire.copied source · line 586 · raw
@copies:Pair(SnapshotResource, SnapshotResource) -> @max_cursors:Nat -> SnapshotCursorDecision
def snapshot.resource.cursor.acquire source · line 598 · raw
@resource:SnapshotResource -> @max_cursors:Nat -> SnapshotCursorDecision
Acquires one child reference without changing a snapshot at its cursor limit.
def snapshot.resource.cursor.release.result source · line 605 · raw
@resource:SnapshotResource -> @has_reference:Bool -> SnapshotCursorDecision
def snapshot.resource.cursor.release.checked source · line 617 · raw
@resource:SnapshotResource -> @cursor_count:Nat -> SnapshotCursorDecision
def snapshot.resource.cursor.release.copied source · line 624 · raw
@copies:Pair(SnapshotResource, SnapshotResource) -> SnapshotCursorDecision
def snapshot.resource.cursor.release source · line 634 · raw
@resource:SnapshotResource -> SnapshotCursorDecision
Releases one child reference and preserves the resource on underflow.
def snapshot.list.cursor.restore source · line 640 · raw
@prefix:List<&2, SnapshotResource> -> @snapshots:List<&2, SnapshotResource> -> List<&2, SnapshotResource>
def snapshot.list.cursor.length.keep.go source · line 649 · raw
@snapshots:List<&2, SnapshotResource> -> @reversed:List<&2, SnapshotResource> -> @length:Nat -> Pair(List<&2, SnapshotResource>, Nat)
def snapshot.list.cursor.length.keep source · line 661 · raw
@snapshots:List<&2, SnapshotResource> -> Pair(List<&2, SnapshotResource>, Nat)
def snapshot.list.cursor.resolve source · line 666 · raw
@prefix:List<&2, SnapshotResource> -> @tail:List<&2, SnapshotResource> -> @acquired:SnapshotCursorDecision -> SnapshotListCursorDecision
def snapshot.list.cursor.close.result source · line 685 · raw
@can_close:Bool -> @prefix:List<&2, SnapshotResource> -> @resource:SnapshotResource -> @tail:List<&2, SnapshotResource> -> SnapshotListCursorDecision
def snapshot.list.cursor.close.resource source · line 697 · raw
@copies:Pair(SnapshotResource, SnapshotResource) -> @prefix:List<&2, SnapshotResource> -> @tail:List<&2, SnapshotResource> -> SnapshotListCursorDecision
def snapshot.list.cursor.action source · line 709 · raw
@prefix:List<&2, SnapshotResource> -> @tail:List<&2, SnapshotResource> -> @resource:SnapshotResource -> @action:SnapshotCursorAction -> SnapshotListCursorDecision
def snapshot.list.cursor.exhausted source · line 726 · raw
@state:SnapshotListCursorState -> SnapshotListCursorDecision
def snapshot.list.cursor.acquire.loop source · line 742 · raw
@fuel:Nat -> @state:SnapshotListCursorState -> SnapshotListCursorDecision
Updates exactly one snapshot cursor count and preserves every unrelated entry.
def snapshot.list.cursor.acquire.measured source · line 783 · raw
@measured:Pair(List<&2, SnapshotResource>, Nat) -> @snapshot_id:U32 -> @action:SnapshotCursorAction -> SnapshotListCursorDecision
def snapshot.list.cursor.acquire source · line 795 · raw
@snapshots:List<&2, SnapshotResource> -> @snapshot_id:U32 -> @max_cursors:Nat -> SnapshotListCursorDecision
Adds one cursor reference to the owner record identified by its snapshot ID.
def snapshot.list.cursor.release source · line 805 · raw
@snapshots:List<&2, SnapshotResource> -> @snapshot_id:U32 -> SnapshotListCursorDecision
Releases exactly one cursor reference from the matching snapshot resource.
def snapshot.list.cursor.close source · line 814 · raw
@snapshots:List<&2, SnapshotResource> -> @snapshot_id:U32 -> SnapshotListCursorDecision
Removes a childless snapshot record and reports Busy while cursors remain.
def owner.cursor.open.ready source · line 822 · raw
@cursor_ids:Pair(U32, U32) -> @allocator:ResourceIdAllocator -> @reservations:Registry -> @snapshots:List<&2, SnapshotResource> -> @cursors:List<&2, CursorResource> -> @snapshot_id:U32 -> OwnerCursorOpenDecision
def owner.cursor.open.allocated source · line 835 · raw
@allocation:ResourceIdDecision -> @reservations:Registry -> @snapshots:List<&2, SnapshotResource> -> @cursors:List<&2, CursorResource> -> @snapshot_id:U32 -> OwnerCursorOpenDecision
def owner.cursor.open.snapshot source · line 850 · raw
@allocator:ResourceIdAllocator -> @reservations:Registry -> @cursors:List<&2, CursorResource> -> @snapshot_id:U32 -> @updated:SnapshotListCursorDecision -> OwnerCursorOpenDecision
def owner.cursor.open.request source · line 871 · raw
@allocator:ResourceIdAllocator -> @reservations:Registry -> @snapshots:List<&2, SnapshotResource> -> @cursors:List<&2, CursorResource> -> @snapshot_ids:Pair(U32, U32) -> @max_cursors:Nat -> OwnerCursorOpenDecision
def owner.cursor.open.available source · line 887 · raw
@owner:OwnerRegistry -> @snapshot_id:U32 -> @max_cursors:Nat -> OwnerCursorOpenDecision
Rejects cursor opens when the owner ID space is exhausted.
def owner.cursor.open source · line 905 · raw
@owner:OwnerRegistry -> @snapshot_id:U32 -> @max_cursors:Nat -> OwnerCursorOpenDecision
Acquires a unique owner cursor ID and a child reference on its snapshot.
def cursor.resource.duplicate.parts source · line 912 · raw
@ids:Pair(U32, U32) -> @snapshots:Pair(U32, U32) -> Pair(CursorResource, CursorResource)
def cursor.resource.duplicate source · line 923 · raw
@resource:CursorResource -> Pair(CursorResource, CursorResource)
def cursor.list.restore source · line 929 · raw
@prefix:List<&2, CursorResource> -> @cursors:List<&2, CursorResource> -> List<&2, CursorResource>
def cursor.list.length.keep.go source · line 938 · raw
@cursors:List<&2, CursorResource> -> @reversed:List<&2, CursorResource> -> @length:Nat -> Pair(List<&2, CursorResource>, Nat)
def cursor.list.length.keep source · line 949 · raw
@cursors:List<&2, CursorResource> -> Pair(List<&2, CursorResource>, Nat)
def cursor.list.remove.exhausted source · line 954 · raw
@state:CursorListRemoveState -> CursorListRemoveDecision
def cursor.list.remove.loop source · line 968 · raw
@fuel:Nat -> @state:CursorListRemoveState -> CursorListRemoveDecision
def cursor.list.remove.measured source · line 1002 · raw
@measured:Pair(List<&2, CursorResource>, Nat) -> @cursor_id:U32 -> CursorListRemoveDecision
def cursor.list.remove source · line 1012 · raw
@cursors:List<&2, CursorResource> -> @cursor_id:U32 -> CursorListRemoveDecision
Removes one owner cursor ID without changing its parent snapshot count.
def owner.cursor.close.released source · line 1018 · raw
@allocator:ResourceIdAllocator -> @reservations:Registry -> @prefix:List<&2, CursorResource> -> @resource:CursorResource -> @tail:List<&2, CursorResource> -> @snapshot_id:U32 -> @released:SnapshotListCursorDecision -> OwnerCursorCloseDecision
def owner.cursor.close.release.id source · line 1044 · raw
@allocator:ResourceIdAllocator -> @reservations:Registry -> @snapshots:List<&2, SnapshotResource> -> @prefix:List<&2, CursorResource> -> @resource:CursorResource -> @tail:List<&2, CursorResource> -> @snapshot_ids:Pair(U32, U32) -> OwnerCursorCloseDecision
def owner.cursor.close.lookup source · line 1059 · raw
@allocator:ResourceIdAllocator -> @reservations:Registry -> @snapshots:List<&2, SnapshotResource> -> @prefix:List<&2, CursorResource> -> @tail:List<&2, CursorResource> -> @copies:Pair(CursorResource, CursorResource) -> OwnerCursorCloseDecision
def owner.cursor.close.removed source · line 1074 · raw
@allocator:ResourceIdAllocator -> @reservations:Registry -> @snapshots:List<&2, SnapshotResource> -> @removal:CursorListRemoveDecision -> OwnerCursorCloseDecision
def owner.cursor.close source · line 1089 · raw
@owner:OwnerRegistry -> @cursor_id:U32 -> OwnerCursorCloseDecision
Releases one owner cursor and its parent snapshot reference atomically.
def owner.snapshot.close.released source · line 1098 · raw
@decision:RegistryReleaseDecision -> @allocator:ResourceIdAllocator -> @cursors:List<&2, CursorResource> -> @prefix:List<&2, SnapshotResource> -> @resource:SnapshotResource -> @tail:List<&2, SnapshotResource> -> OwnerSnapshotCloseDecision
def owner.snapshot.close.resource source · line 1114 · raw
@copies:Pair(SnapshotResource, SnapshotResource) -> @allocator:ResourceIdAllocator -> @cursors:List<&2, CursorResource> -> @prefix:List<&2, SnapshotResource> -> @tail:List<&2, SnapshotResource> -> @reservations:Registry -> OwnerSnapshotCloseDecision
def owner.snapshot.close.list source · line 1130 · raw
@allocator:ResourceIdAllocator -> @reservations:Registry -> @cursors:List<&2, CursorResource> -> @decision:SnapshotListCursorDecision -> OwnerSnapshotCloseDecision
def owner.snapshot.close source · line 1151 · raw
@owner:OwnerRegistry -> @snapshot_id:U32 -> OwnerSnapshotCloseDecision
Closes a snapshot only after its final cursor releases the retained root.
def snapshot.close.registry source · line 1161 · raw
@decision:RegistryReleaseDecision -> SnapshotCloseDecision
Maps a valid registry release to successful snapshot closure.
def snapshot.close source · line 1167 · raw
@lifecycle:Lifecycle -> @registry:Registry -> @released_bytes:Nat -> SnapshotCloseDecision
Leaves registry accounting untouched while a cursor still references the snapshot.
def cursor.acquire source · line 1181 · raw
@lifecycle:Lifecycle -> LifecycleDecision
Adds a cursor reference to an open snapshot.
def cursor.release source · line 1187 · raw
@lifecycle:Lifecycle -> LifecycleDecision
Releases one cursor reference, rejecting underflow and closed snapshots.
def close source · line 1196 · raw
@lifecycle:Lifecycle -> LifecycleDecision
Closes a snapshot only after its final cursor reference has been released.
def publish_generation.copied source · line 1205 · raw
@copies:Pair(Nat, Nat) -> @current_bytes:Nat -> @references:Nat -> GenerationDecision
Publishes a generation from independent copies of its current identifier.
def publish_generation source · line 1219 · raw
@current:Nat -> @current_bytes:Nat -> @references:Nat -> GenerationDecision
Publishes a new current generation and retains its predecessor while referenced.
def publish.registry.current source · line 1226 · raw
@current:FileGeneration -> @retired:List<&2, FileGeneration> -> @next_bytes:Nat -> GenerationRegistry
def publish.registry source · line 1241 · raw
@registry:GenerationRegistry -> @next_bytes:Nat -> GenerationRegistry
def pin.retired.prepend source · line 1249 · raw
@id:Nat -> @size:Nat -> @references:Nat -> @result:RetiredPin -> RetiredPin
def pin.retired.loop source · line 1261 · raw
@retired:List<&2, FileGeneration> -> @+target:Nat -> @matches:Bool -> RetiredPin
def pin.retired source · line 1289 · raw
@+retired:List<&2, FileGeneration> -> @+target:Nat -> RetiredPin
def pin.registry.retired source · line 1300 · raw
@id:Nat -> @size:Nat -> @references:Nat -> @retired:RetiredPin -> GenerationPinDecision
def pin.registry.decision source · line 1313 · raw
@+id:Nat -> @+size:Nat -> @+references:Nat -> @+retired:List<&2, FileGeneration> -> @+target:Nat -> @matches:Bool -> GenerationPinDecision
def pin.registry.current source · line 1329 · raw
@current:FileGeneration -> @retired:List<&2, FileGeneration> -> @+target:Nat -> GenerationPinDecision
def pin_generation source · line 1340 · raw
@registry:GenerationRegistry -> @target:Nat -> GenerationPinDecision
Increments the reference count of one current or retired generation.
def release.retired.prepend source · line 1348 · raw
@id:Nat -> @size:Nat -> @references:Nat -> @result:RetiredRelease -> RetiredRelease
def release.retired.references source · line 1363 · raw
@id:Nat -> @size:Nat -> @references:Nat -> @tail:List<&2, FileGeneration> -> RetiredRelease
def release.retired.loop source · line 1377 · raw
@retired:List<&2, FileGeneration> -> @+target:Nat -> @matches:Bool -> RetiredRelease
def release.retired source · line 1403 · raw
@+retired:List<&2, FileGeneration> -> @+target:Nat -> RetiredRelease
def release.registry.retired source · line 1414 · raw
@id:Nat -> @size:Nat -> @references:Nat -> @result:RetiredRelease -> GenerationReleaseDecision
def release.registry.references source · line 1431 · raw
@id:Nat -> @size:Nat -> @references:Nat -> @retired:List<&2, FileGeneration> -> GenerationReleaseDecision
def release.registry.decision source · line 1445 · raw
@+id:Nat -> @+size:Nat -> @+references:Nat -> @+retired:List<&2, FileGeneration> -> @+target:Nat -> @matches:Bool -> GenerationReleaseDecision
def release.registry.current source · line 1460 · raw
@current:FileGeneration -> @retired:List<&2, FileGeneration> -> @+target:Nat -> GenerationReleaseDecision
def release_generation.in source · line 1470 · raw
@registry:GenerationRegistry -> @target:Nat -> GenerationReleaseDecision
def release_generation.from_registry source · line 1478 · raw
@registry:GenerationRegistry -> @target:Nat -> GenerationReleaseDecision
def release_generation source · line 1485 · raw
@retired:RetiredGeneration -> RetentionDecision
Releases one reference and reclaims a retired generation after its final reader.