Skip to content

Commit

Permalink
Merge pull request #18913 from influxdata/sgc/issues/performance
Browse files Browse the repository at this point in the history
fix(storage): Reduce the check frequency
  • Loading branch information
stuartcarnie authored Jul 10, 2020
2 parents 16500ee + 99bbbd3 commit b2923d0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tsdb/tsm1/engine_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import (
"github.com/influxdata/influxql"
)

// cancelCheckInterval represents the period at which TagKeys and TagValues
// will check for a canceled context. Specifically after every 64 series
// scanned, the query context will be checked for cancellation, and if canceled,
// the calls will immediately return.
const cancelCheckInterval = 64
// cancelCheckInterval represents the period at which various schema calls
// will check for a canceled context. It is important this
// is not too frequent, or it could cause expensive context switches in
// tight loops.
const cancelCheckInterval = 5000

// TagValues returns an iterator which enumerates the values for the specific
// tagKey in the given bucket matching the predicate within the
Expand Down

0 comments on commit b2923d0

Please sign in to comment.