ByteDurableDb.compact.manifest.loaded: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as ByteDurableDb Lines 993-1022 of mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&start_line=993&end_line=1022 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/ByteSstFile.bend as ByteSstFile 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 import mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend as VisibleStats def compact.manifest.loaded( +path: String, lock: DbLock.Lock, table: ByteMemTable.Table, result: Result<&1, &1, ByteManifestIo.Error, ByteManifest.ManifestValue> ) -> IO(Handle & Result<&1, &1, Error, Unit>): match table: case ByteMemTable.Table{entries}: match result: case Fail{ByteManifestIo.Invalid{_}}: IO.pure(Handle & Result<&1, &1, Error, Unit>, (Handle{path, lock, ByteMemTable.Table{entries}, Open{}, VisibleStats.Stats{0n, 0n}}, Fail{Corruption{"byte manifest validation failed"}})) case Fail{ByteManifestIo.Host{code, message}}: IO.pure(Handle & Result<&1, &1, Error, Unit>, (Handle{path, lock, ByteMemTable.Table{entries}, Open{}, VisibleStats.Stats{0n, 0n}}, Fail{Io{code, message}})) case Done{ByteManifest.Empty{}}: compact.entries(path, lock, ByteSstFile.entries.clone(entries)) case Done{ByteManifest.GenerationEmpty{}}: compact.entries(path, lock, ByteSstFile.entries.clone(entries)) case Done{ByteManifest.HasSst{}}: do IO>: base : Result<&1, &1, U32 & String, ByteMemTable.Table> <- ByteSstIo.read(path ++ "/SST") compact.sst.loaded(path, lock, ByteMemTable.Table{entries}, base) case Done{ByteManifest.GenerationSst{file_id}}: do IO>: base : Result<&1, &1, U32 & String, ByteMemTable.Table> <- ByteSstIo.read(ByteManifest.sst.generation.path(path, file_id)) compact.sst.loaded(path, lock, ByteMemTable.Table{entries}, base) Uses (23): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=Error https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=Handle https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=HandleState https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=compact.entries https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=compact.sst.loaded https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteManifest.bend&name=ManifestValue https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteManifest.bend&name=sst.generation.path https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteManifestIo.bend&name=Error https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend&name=Table https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend&name=entries.clone https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteSstIo.bend&name=read https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DbLock.bend&name=Lock https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend&name=Stats