def reserve

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

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

303# Decides whether one snapshot fits the configured count and byte limits.
304def reserve(
305  snapshot_count: Nat,
306  retained_bytes: Nat,
307  requested_bytes: Nat,
308  max_snapshots: Nat,
309  max_retained_bytes: Nat
310) -> Decision:
311  reserve.result.checked(reserve.bytes(nat.duplicate(retained_bytes),
312    nat.duplicate(requested_bytes), nat.duplicate(snapshot_count), max_snapshots,
313    max_retained_bytes))

Uses (5)

Used by (3)