def source.wal.validated

mylsm-lsm-store@0.6.0.1 · src/transfer/MigrateIo.bend:846

import mylsm-lsm-store@0.6.0.1/src/transfer/MigrateIo.bend as MigrateIo
import Base

846def source.wal.validated(
847  sst: Nat & Nat,
848  state: TableValidation
849) -> IO(Result<&1, &1, Error, SourceSnapshot>):
850  match sst state:
851    case (sst_entries, sst_bytes) TableValidation{lock, path, result,
852        sst_records, wal_batches}:
853      match result:
854        case Fail{error}:
855          source.release(lock, path, Fail{error})
856        case Done{(wal_frames, wal_bytes)}:
857          source.release(lock, path, Done{LegacySourceSnapshot{sst_records,
858            wal_batches, sst_entries, wal_frames, Nat.add(sst_bytes, wal_bytes)}})

Uses (10)

Used by (1)