Skip to content

Commit

Permalink
Merge pull request #8698 from influxdata/jw-compact
Browse files Browse the repository at this point in the history
Reduce CPU usage for some compactions
  • Loading branch information
jwilder authored Aug 15, 2017
2 parents 442581d + 61b13eb commit 3fb7941
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tsdb/engine/tsm1/compact.go
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,10 @@ func (b *block) markRead(min, max int64) {
}

func (b *block) partiallyRead() bool {
// If readMin and readMax are still the initial values, nothing has been read.
if b.readMin == int64(math.MaxInt64) && b.readMax == int64(math.MinInt64) {
return false
}
return b.readMin != b.minTime || b.readMax != b.maxTime
}

Expand Down

0 comments on commit 3fb7941

Please sign in to comment.