Merge pull request #8455 from benbjohnson/tsi-level-file-count-check

Check file count before attempting a TSI level compaction.
pull/7209/merge
Ben Johnson 2017-06-07 14:09:12 -06:00 committed by GitHub
commit 4957b3d8be
2 changed files with 5 additions and 1 deletions

View File

@ -87,7 +87,7 @@ The following new configuration options are available.
- [#7957](https://github.com/influxdata/influxdb/issues/7957): URL query parameter credentials take priority over Authentication header.
- [#8443](https://github.com/influxdata/influxdb/issues/8443): TSI branch has duplicate tag values.
- [#8299](https://github.com/influxdata/influxdb/issues/8299): Out of memory when using HTTP API
- [#8455](https://github.com/influxdata/influxdb/pull/8455): Check file count before attempting a TSI level compaction.
## v1.2.4 [2017-05-08]

View File

@ -805,7 +805,11 @@ func (i *Index) compact() {
}
// Collect files for the level.
// Skip if we don't have enough files in the level.
files := fs.IndexFilesByLevel(level)
if len(files) < 2 {
continue
}
// Calculate total size. Skip level if it doesn't meet min size of next level.
var size int64