Skip to main content

Module metadata

Module metadata 

Source
Expand description

Metadata Cache — in-memory cache for segment metadata.

Caches segment headers, bloom filters, and column statistics permanently in memory. Updated on segment creation, compaction, and deletion. Memory cost is approximately 1 KB per segment — no eviction needed.

§Eviction policy

This cache intentionally has no LRU eviction. Each entry is ~1 KB (header + column stats), so even 100 000 segments consume only ~100 MB. Segments are explicitly removed from the cache when they are deleted or compacted away (see MetadataCache::remove). If segment counts ever grow to the point where this becomes a concern, an LRU bound or generation-based eviction can be layered on top.

Structs§

CachedSegmentMeta
Cached metadata for a single segment.
MetadataCache
In-memory metadata cache for all segments.