Skip to content

Commit 62e215a

Browse files
refactor: change default value for max-node-to-split-index
1 parent e94030d commit 62e215a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

config/config.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ type ClickHouse struct {
223223

224224
WildcardMinDistance int `toml:"wildcard-min-distance" json:"wildcard-min-distance" comment:"If a wildcard appears both at the start and the end of a plain query at a distance (in terms of nodes) less than wildcard-min-distance, then it will be discarded. This parameter can be used to discard expensive queries."`
225225
TrySplitQuery bool `toml:"try-split-query" json:"try-split-query" comment:"Plain queries like '{first,second}.custom.metric.*' are also a subject to wildcard-min-distance restriction. But can be split into 2 queries: 'first.custom.metric.*', 'second.custom.metric.*'."`
226-
MaxNodeToSplitIndex int `toml:"max-node-to-split-index" json:"max-node-to-split-index" comment:"Used only if try-split-query is true. Query that contains list will be split if its (list) node index is less or equal to max-node-to-split-index."`
226+
MaxNodeToSplitIndex int `toml:"max-node-to-split-index" json:"max-node-to-split-index" comment:"Used only if try-split-query is true. Query that contains list will be split if its (list) node index is less or equal to max-node-to-split-index. By default is 0"`
227227
TagsMinInQuery int `toml:"tags-min-in-query" json:"tags-min-in-query" comment:"Minimum tags in seriesByTag query"`
228228
TagsMinInAutocomplete int `toml:"tags-min-in-autocomplete" json:"tags-min-in-autocomplete" comment:"Minimum tags in autocomplete query"`
229229

@@ -403,7 +403,6 @@ func New() *Config {
403403
InternalAggregation: true,
404404
FindLimiter: limiter.NoopLimiter{},
405405
TagsLimiter: limiter.NoopLimiter{},
406-
MaxNodeToSplitIndex: -1,
407406
},
408407
Tags: Tags{
409408
Threads: 1,

doc/config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ Only one tag used as filter for index field Tag1, see graphite_tagged table [str
315315
wildcard-min-distance = 0
316316
# Plain queries like '{first,second}.custom.metric.*' are also a subject to wildcard-min-distance restriction. But can be split into 2 queries: 'first.custom.metric.*', 'second.custom.metric.*'.
317317
try-split-query = false
318-
# Used only if try-split-query is true. Query that contains list will be split if its node index is less or equal to max-node-to-split-index.
319-
max-node-to-split-index = -1
318+
# Used only if try-split-query is true. Query that contains list will be split if its (list) node index is less or equal to max-node-to-split-index. By default is 0
319+
max-node-to-split-index = 0
320320
# Minimum tags in seriesByTag query
321321
tags-min-in-query = 0
322322
# Minimum tags in autocomplete query

0 commit comments

Comments
 (0)