bitcask-compaction-renumbers-active

Status: IN

After compaction, merged files get IDs above the old active file, and the active file is renamed to an even higher ID to maintain the monotonically increasing file ID invariant.

Source: entries/2026/05/28/hash-index-storage-bitcask.md

Example

self._segment_counter += 1
self._active_path = self._segment_path(self._segment_counter)
self._active_file = open(self._active_path, "ab")

JSON