def put.probe

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

import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as ByteDurableDb
import Base
import mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend as ByteMemTable
import mylsm-lsm-store@0.6.0.1/src/DbLock.bend as DbLock
import mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend as VisibleStats
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

2015def put.probe(
2016  +path: String,
2017  lock: DbLock.Lock,
2018  table: ByteMemTable.Table,
2019  state: HandleState,
2020  base_stats: VisibleStats.Stats,
2021  probe: ByteMemTable.Probe,
2022  keys: Bytes.Bytes & Bytes.Bytes,
2023  value: Bytes.Bytes
2024) -> IO(Handle & Result<&1, &1, Error, Unit>):
2025  match probe:
2026    case ByteMemTable.Absent{}:
2027      put.probe.absent(path, lock, table, state, base_stats, keys, value)
2028    case _:
2029      put.probe.present(path, lock, table, state, base_stats, keys, value)

Uses (15)

Used by (1)