3 ms·
Sorry I didn't get back to this. It's a virtual linear log file which gets split occasionally by appending a sorted list of pointers to the end and "closing" t
by brongondwana 10y ago
Sorry I didn't get back to this.
It's a virtual linear log file which gets split occasionally by appending a sorted list of pointers to the end and "closing" that log file, along with occasional tasks repacking the log files together.
Individual records (either key/value or key/tombstone) have a pointer showing how far back they cast a "shadow" so you know how long you need to keep tombstones for.
Since only the active log file can ever have changes made, you can repack any two adjacent files together into a single compacted log file at any time, removing any duplicates or tombstones that don't cast a shadow outside the range being compacted.