Date: 2026-05-29
Time: 06:57
I'll work from the test file content provided, which gives a clear picture of the implementation's public API.
sstable-and-compaction/sstable.py — The implementation itself: block format, sparse index structure, and the k-way merge algorithmsstable-and-compaction/sstable.py:merge_sstables — How the k-way merge resolves conflicts and handles tombstone removal — likely uses a heap/priority queuesstable-and-compaction/test_sstable.py — The author's own tests, likely covering error paths and internal details that the tester suite skipssstable-block-format — How block_size affects the sparse index and binary search within blocks — the default of 4 in tests is suspiciously small and worth understandinglog-structured-merge-tree/lsm.py — The LSM tree implementation that likely builds on this SSTable layer, adding a memtable and multi-level compactionsstable-range-scan-exclusive-end — SSTableReader.range_scan(start, end) uses inclusive start and exclusive end boundariessstable-timestamp-conflict-resolution — During SSTable merge, the entry with the highest timestamp wins when the same key appears in multiple inputssstable-tombstone-optional-removal — Tombstones survive merges by default; they are only stripped when mergesstables() is called with removetombstones=Truesstable-leveled-compaction-promotes-to-l1 — After leveled compaction triggers, the resulting SSTable is assigned to level 1sstable-tester-tests-happy-path-only — The tester suite validates correct behavior but does not test error conditions like corrupt files or out-of-order insertion