def page.next.cloned

mylsm-lsm-store@0.6.0.1 · src/ByteSstFile.bend:405

import mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend as ByteSstFile
import Base
import mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend as ByteMemTable
import mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend as StorageBytes
import mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockBuilder.bend as ByteBlockBuilder

405def page.next.cloned(
406  tail: List<&1, ByteMemTable.Entry>,
407  current_count: Nat,
408  current_bytes: Nat,
409  +max_bytes: Nat,
410  copies: ByteMemTable.Entry & ByteMemTable.Entry
411) -> List<&1, ByteMemTable.Entry> & ByteBlockBuilder.Decision:
412  match copies:
413    case (for_decision, for_remaining):
414      (Con{for_remaining, tail}, ByteBlockBuilder.decide.target(current_bytes,
415        page.record.required(for_decision, Nat.is_gt(current_count, 0n)),
416        Nat.min(U32.to_nat(StorageBytes.TARGET_BLOCK_BYTES()), max_bytes), max_bytes))

Uses (12)

Used by (1)