def append.chunked.slices

mylsm-lsm-store@0.6.0.1 · src/ByteWalIo.bend:583

import mylsm-lsm-store@0.6.0.1/src/ByteWalIo.bend as ByteWalIo
import Base
import mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend as ByteMemTable
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

583# Clones a large WAL frame before forming its bounded append chunks.
584def append.chunked.slices(
585  file: File,
586  frame: Bytes.Bytes,
587  total: U32,
588  +path: String
589) -> IO(Result<&1, &1, U32 & String, Unit>):
590  do IO<Result<&1, &1, U32 & String, Unit>>:
591    sources : Bytes.Bytes & Bytes.Bytes <-
592      IO.pure(Bytes.Bytes & Bytes.Bytes, ByteMemTable.bytes.clone(frame))
593    append.chunked.cloned(file, sources, total, path)

Uses (12)

Used by (1)