def snapshot.close
import mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend as Snapshotimport Base
1166# Leaves registry accounting untouched while a cursor still references the snapshot.
1167def snapshot.close(
1168 lifecycle: Lifecycle,
1169 registry: Registry,
1170 released_bytes: Nat
1171) -> SnapshotCloseDecision:
1172 match lifecycle:
1173 case Closed{}: InvalidSnapshotClose{registry}
1174 case Live{cursor_count}:
1175 match cursor_count:
1176 case 0n:
1177 snapshot.close.registry(registry.release(registry, released_bytes))
1178 case 1n+rest: SnapshotBusy{registry}
Uses (6)
Used by (0)
No other definition uses this definition.