def compact.pathcopies

mylsm-lsm-store@0.6.0.1 · src/ByteDurableDb.bend:1024

import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as ByteDurableDb
import Base
import mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend as ByteMemTable
import mylsm-lsm-store@0.6.0.1/src/ByteManifest.bend as ByteManifest
import mylsm-lsm-store@0.6.0.1/src/ByteManifestIo.bend as ByteManifestIo
import mylsm-lsm-store@0.6.0.1/src/DbLock.bend as DbLock

1024def compact.pathcopies(
1025  copies: String & String,
1026  lock: DbLock.Lock,
1027  table: ByteMemTable.Table
1028) -> IO(Handle & Result<&1, &1, Error, Unit>):
1029  match copies:
1030    case (read_path, retained_path):
1031      do IO<Handle & Result<&1, &1, Error, Unit>>:
1032        manifest : Result<&1, &1, ByteManifestIo.Error, ByteManifest.ManifestValue> <-
1033          ByteManifestIo.read(read_path ++ "/MANIFEST")
1034        compact.manifest.loaded(retained_path, lock, table, manifest)

Uses (16)

Used by (1)