{"id":"sstable-merge-dedup-newest-timestamp","text":"When multiple SSTables contain the same key, `merge_sstables` keeps only the entry with the highest timestamp via heap ordering `(key, -timestamp)`, silently discarding all older versions.","truth_value":"IN","source":"entries/2026/05/28/sstable-and-compaction-sstable-merge_sstables.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{"example":"if result and result[0] == current_key:\n    pass  # older timestamp, skip\nelse:\n    result.append((current_key, current_value))"},"explanation":{"steps":[{"node":"sstable-merge-dedup-newest-timestamp","truth_value":"IN","reason":"premise"}]}}