def owner.snapshot.open.budget

mylsm-lsm-store@0.6.0.1 · src/scan/Snapshot.bend:488

import mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend as Snapshot
import Base

488def owner.snapshot.open.budget(
489  allocator: ResourceIdAllocator,
490  snapshots: List<&2, SnapshotResource>,
491  cursors: List<&2, CursorResource>,
492  generation: Nat,
493  requested_bytes: Nat & Nat,
494  release_bytes: Nat,
495  limits: Nat & Nat,
496  reservations: Registry
497) -> OwnerOpenDecision:
498  match requested_bytes:
499    case (retained_for_entry, retained_for_admission):
500      match limits:
501        case (max_snapshots, max_retained_bytes):
502          owner.snapshot.open.reserved(allocator, snapshots, cursors,
503            generation, (retained_for_entry, release_bytes),
504            registry.reserve(reservations, retained_for_admission,
505              max_snapshots, max_retained_bytes))

Uses (11)

Used by (1)