def read_table_limited

mylsm-lsm-store@0.6.0.1 · src/SstStreamIo.bend:432

import mylsm-lsm-store@0.6.0.1/src/SstStreamIo.bend as SstStreamIo
import Base
import mylsm-lsm-store@0.6.0.1/src/Fs.bend as Fs
import mylsm-lsm-store@0.6.0.1/src/Sstable.bend as Sstable

432# Reads one SST only when its complete on-disk size fits the caller's budget.
433def read_table_limited(
434  +path: String,
435  max_bytes: Nat
436) -> IO(Result<&1, &1, U32 & String, Sstable.Table>):
437  do IO<Result<&1, &1, U32 & String, Sstable.Table>>:
438    size : Result<&1, &1, U32 & String, Nat> <- Fs.file_size(path)
439    read.table.limited.file_size(path, max_bytes, size)

Uses (10)

Used by (1)