def flush

mylsm-lsm-store@0.6.0.1 · src/ByteDurableDb.bend:956

import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as ByteDurableDb
import Base
import mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend as VisibleStats

956# Publishes the current byte table as an authenticated SST snapshot.
957def flush(handle: Handle) -> IO(Handle & Result<&1, &1, Error, Unit>):
958  match handle:
959    case Handle{path, lock, table, Open{}, base_stats}:
960      flush.open(path, lock, table)
961    case Handle{path, lock, table, Poisoned{}, base_stats}:
962      IO.pure(Handle & Result<&1, &1, Error, Unit>,
963        (Handle{path, lock, table, Poisoned{}, VisibleStats.Stats{0n, 0n}}, Fail{CommitUnknown{0, "database handle requires reopen"}}))

Uses (11)

Used by (2)