def flush.snapshot.publish.file_ids
mylsm-lsm-store@0.6.0.1 · src/ByteDurableDb.bend:793
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/ByteSstIo.bend as ByteSstIo
import mylsm-lsm-store@0.6.0.1/src/DbLock.bend as DbLock
793def flush.snapshot.publish.file_ids(
794 paths: String & (String & String),
795 lock: DbLock.Lock,
796 table: ByteMemTable.Table,
797 pair: List<&1, ByteMemTable.Entry> & List<&1, ByteMemTable.Entry>,
798 file_ids: U32 & U32
799) -> IO(Handle & Result<&1, &1, Error, Unit>):
800 match paths:
801 case (directory, (file_directory, retained_path)):
802 match pair:
803 case (encoded, retained):
804 match file_ids:
805 case (for_path, for_manifest):
806 do IO<Handle & Result<&1, &1, Error, Unit>>:
807 written : Result<&1, &1, U32 & String, Unit> <-
808 ByteSstIo.write_atomic_at(directory,
809 ByteManifest.sst.generation.path(file_directory, for_path), encoded)
810 flush.written(retained_path, lock, table, retained, for_manifest, written)