doc: rephrasing of how sets of SeriesIterators are generated.
Signed-off-by: Jon Seymour <jon@wildducktheories.com>pull/5678/head
parent
58d1b7223a
commit
cdc7e28338
|
@ -93,7 +93,7 @@ The compaction algorithm is continuously running and always selects files to com
|
|||
2. If any TSM files contain points with older timestamps that also exist in the WAL files, those TSM files are added to the compaction set.
|
||||
3. If any TSM files have a tombstone marker, those TSM files are added to the compaction set.
|
||||
|
||||
The compaction is used to generate a set of SeriesIterators that return a sequence of `key`, `Values` where each `key` returned is lexicographically greater than the previous one. The iterators are ordered such that WAL iterators will override any values returned by the TSM file iterators. WAL iterators read and cache the WAL segment so that deletes later in the log can be processed correctly. TSM file iterators use the tombstone files to ensure that deleted series are not returned during iteration. As each key is processed, the Values slice is grown, sorted, and then written to a new block in the new TSM file. The blocks can be split based on number of points or size of the block. If the total size of the current TSM file would exceed the maximum file size, a new file is created.
|
||||
The compaction algorithm generates a set of SeriesIterators that return a sequence of `key`, `Values` where each `key` returned is lexicographically greater than the previous one. The iterators are ordered such that WAL iterators will override any values returned by the TSM file iterators. WAL iterators read and cache the WAL segment so that deletes later in the log can be processed correctly. TSM file iterators use the tombstone files to ensure that deleted series are not returned during iteration. As each key is processed, the Values slice is grown, sorted, and then written to a new block in the new TSM file. The blocks can be split based on number of points or size of the block. If the total size of the current TSM file would exceed the maximum file size, a new file is created.
|
||||
|
||||
Deletions can occur while a new file is being written. Since the new TSM file is not complete a tombstone would not be written for it. This could result in deleted values getting written into a new file. To prevent this, if a compaction is running and a delete occurs, the current compaction is aborted and new compaction is started.
|
||||
|
||||
|
|
Loading…
Reference in New Issue