def flush.open

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

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

945# Clones table entries before creating a canonical snapshot.
946def flush.open(
947  +path: String,
948  lock: DbLock.Lock,
949  table: ByteMemTable.Table
950) -> IO(Handle & Result<&1, &1, Error, Unit>):
951  do IO<Handle & Result<&1, &1, Error, Unit>>:
952    manifest : Result<&1, &1, ByteManifestIo.Error, ByteManifest.ManifestValue> <-
953      ByteManifestIo.read(path ++ "/MANIFEST")
954    flush.manifest.loaded(path, lock, table, manifest)

Uses (15)

Used by (1)