Check file count before attempting a TSI level compaction.
This check was previously in a different section of code which was lost during a refactor to the new compaction strategy. The compaction planning now makes a check to ensure at least two files are available for compaction in a level.pull/8455/head
parent
160fafb6c0
commit
bcc6ef769b
|
@ -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.
|
- [#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.
|
- [#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
|
- [#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]
|
## v1.2.4 [2017-05-08]
|
||||||
|
|
||||||
|
|
|
@ -805,7 +805,11 @@ func (i *Index) compact() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Collect files for the level.
|
// Collect files for the level.
|
||||||
|
// Skip if we don't have enough files in the level.
|
||||||
files := fs.IndexFilesByLevel(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.
|
// Calculate total size. Skip level if it doesn't meet min size of next level.
|
||||||
var size int64
|
var size int64
|
||||||
|
|
Loading…
Reference in New Issue