def tail.truncated

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

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 mylsm-lsm-store@0.6.0.1/src/Fs.bend as Fs

243def tail.truncated(
244  result: Result<&1, &1, U32 & String, Unit>,
245  +path: String,
246  table: ByteMemTable.Table
247) -> IO(Result<&1, &1, U32 & String, ByteMemTable.Table>):
248  match result:
249    case Fail{failure}:
250      IO.pure(Result<&1, &1, U32 & String, ByteMemTable.Table>, Fail{failure})
251    case Done{Unit{}}:
252      do IO<Result<&1, &1, U32 & String, ByteMemTable.Table>>:
253        synced : Result<&1, &1, U32 & String, Unit> <- Fs.fsync(path)
254        tail.synced(synced, table)

Uses (11)

Used by (1)