Types & Constants¶
Type aliases, constants, enums, and protocols used throughout the library.
OpType¶
OpType
¶
Bases: IntEnum
Operation type stored in each WAL entry.
Encoded as an integer for compact msgpack serialisation. Using IntEnum so the value is directly packable without conversion.
Constants¶
Type stub for app.types — type aliases, constants, enums, and protocols.
TOMBSTONE = b'\x00__tomb__\x00'
module-attribute
¶
Sentinel value written in place of a value to mark a key as deleted.
BLOCK_SIZE_DEFAULT = 4096
module-attribute
¶
Default SSTable data-block size in bytes (4 KB).
MAX_MEMTABLE_SIZE = 67108864
module-attribute
¶
Maximum memtable size in bytes (64 MB) before it is frozen and flushed.
L0_COMPACTION_THRESHOLD = 10
module-attribute
¶
Number of L0 SSTables that triggers a compaction run to L1.
IMMUTABLE_QUEUE_MAX = 4
module-attribute
¶
Maximum frozen memtable snapshots queued before backpressure kicks in.
COMPACTION_CHECK_INTERVAL = 0.5
module-attribute
¶
Seconds between compaction worker wake-ups to check L0 file count.
PARALLELISM_MODE = _detect_parallelism_mode()
module-attribute
¶
Parallelism strategy: 'free_threaded' when GIL is disabled, else 'multiprocessing'.