Module event_bitmap

Module event_bitmap 

Source
Expand description

(dimension_key, bucket)BitmapBlob.

Same wire shape as super::transaction_bitmap but indexes packed-event-seq space — each set bit identifies a single event by (tx_seq << EVENT_BITS) | event_idx.

The merge operator is identical in structure to the transaction-bitmap one (union + optimize). The per-bucket compaction filter translates the tx_seq pruning floor from pruning_watermark::tx_seq_floor into packed-event-seq space (tx_seq << EVENT_BITS) and drops buckets that fit entirely below it.

Structs§

DimensionPrefix
Prefix encoder for “all buckets recorded against dimension_key”. Encodes as the raw dimension bytes — the leading bytes of every Key whose dimension_key matches.
Key

Constants§

EVENT_BITS
Number of low-order bits in a packed_event_seq reserved for the per-transaction event_idx. A transaction may emit up to 1 << EVENT_BITS events without colliding with the next transaction’s packed range.
EVENT_BUCKET_SIZE
Number of consecutive packed_event_seq values represented by one bucket. Sized so each bucket covers EVENT_BUCKET_SIZE >> EVENT_BITS = 4096 consecutive transactions worth of events.
NAME

Functions§

bit_of
The bit position within a bucket for a given packed event sequence. The cast is safe because EVENT_BUCKET_SIZE fits in a u32 (enforced at compile time above).
bucket_of
The bucket that owns a given packed event sequence.
options
CF options: install the bitmap-union merge operator and a per-bucket compaction filter that drops buckets whose entire packed-event-seq range sits below the pruning floor.
pack
Pack (tx_seq, event_idx) into a single 64-bit positional identifier: tx_seq << EVENT_BITS | event_idx.
store_bitmap
Build a (Key, Value) pair that stages the given bitmap as a merge operand against the existing on-disk bitmap. Useful for pipelines that batch many events into one bucket per dimension before writing.
store_match
Build a (Key, Value) pair that adds the event identified by (tx_seq, event_idx) to the bitmap for its dimension and bucket. The merge operator unions this single-bit operand with whatever’s already on disk.

Type Aliases§

Value