def owner.snapshot.close.resource
import mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend as Snapshotimport Base
1114def owner.snapshot.close.resource(
1115 copies: SnapshotResource & SnapshotResource,
1116 allocator: ResourceIdAllocator,
1117 cursors: List<&2, CursorResource>,
1118 prefix: List<&2, SnapshotResource>,
1119 tail: List<&2, SnapshotResource>,
1120 reservations: Registry
1121) -> OwnerSnapshotCloseDecision:
1122 match copies:
1123 case (for_check, for_update):
1124 match for_check:
1125 case SnapshotResource{_, _, retained_bytes, _}:
1126 owner.snapshot.close.released(
1127 registry.release(reservations, retained_bytes), allocator,
1128 cursors, prefix, for_update, tail)