You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dynamic splitting by interval for range queries (#6458)
* add limit for range query max splits by interval
Signed-off-by: Ahmed Hassan <[email protected]>
* Change dynamic interval sharding to take into account vertical sharding
Signed-off-by: Ahmed Hassan <[email protected]>
* add dynamic sharding based on total days of data fetched for query
Signed-off-by: Ahmed Hassan <[email protected]>
* add unit tests for dynamicIntervalFn
Signed-off-by: Ahmed Hassan <[email protected]>
* allow using any base interval size for dynamicIntervalFn
Signed-off-by: Ahmed Hassan <[email protected]>
* add dynamic query splits to experimental features
Signed-off-by: Ahmed Hassan <[email protected]>
* rename dynamicIntervalFn unit tests
Signed-off-by: Ahmed Hassan <[email protected]>
* refactor dynamicIntervalFn to be more readable
Signed-off-by: Ahmed Hassan <[email protected]>
* add unit tests for getIntervalFromMaxSplits
Signed-off-by: Ahmed Hassan <[email protected]>
* add unit tests for analyzeDurationFetchedByQuery
Signed-off-by: Ahmed Hassan <[email protected]>
* fix formatting
Signed-off-by: Ahmed Hassan <[email protected]>
* update docs
Signed-off-by: Ahmed Hassan <[email protected]>
* update experimental features
Signed-off-by: Ahmed Hassan <[email protected]>
* fix dynamic splitting when query range is shorter than base interval
Signed-off-by: Ahmed Hassan <[email protected]>
* refactor dynamic query splitting into smaller helper functions
Signed-off-by: Ahmed Hassan <[email protected]>
* use duration instead of int for dynamic query splitting calculation
Signed-off-by: Ahmed Hassan <[email protected]>
* add comments for getIntervalFromMaxSplits
Signed-off-by: Ahmed Hassan <[email protected]>
* add ceilDiv helper function
Signed-off-by: Ahmed Hassan <[email protected]>
* add default max splits by duration fetched
Signed-off-by: Ahmed Hassan <[email protected]>
* add new unit tests for helper functions
Signed-off-by: Ahmed Hassan <[email protected]>
* add changelog
Signed-off-by: Ahmed Hassan <[email protected]>
---------
Signed-off-by: Ahmed Hassan <[email protected]>
Signed-off-by: Ahmed Hassan <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Changelog
2
2
3
3
## master / unreleased
4
+
*[FEATURE] Query Frontend: Add dynamic interval size for query splitting. This is enabled by configuring experimental flags `querier.max-shards-per-query` and/or `querier.max-fetched-data-duration-per-query`. The split interval size is dynamically increased to maintain a number of shards and total duration fetched below the configured values. #6458
4
5
*[ENHANCEMENT] Add `compactor.auto-forget-delay` for compactor to auto forget compactors after X minutes without heartbeat. #6533
5
-
6
6
*[FEATURE] Querier/Ruler: Add `query_partial_data` and `rules_partial_data` limits to allow queries/rules to be evaluated with data from a single zone, if other zones are not available. #6526
7
7
*[ENHANCEMENT] StoreGateway: Emit more histogram buckets on the `cortex_querier_storegateway_refetches_per_query` metric. #6570
8
8
*[ENHANCEMENT] Querier: Apply bytes limiter to LabelNames and LabelValuesForLabelNames. #6568
f.IntVar(&cfg.MaxShardsPerQuery, "querier.max-shards-per-query", 0, "[EXPERIMENTAL] Maximum number of shards for a query, 0 disables it. Dynamically uses a multiple of split interval to maintain a total number of shards below the set value. If vertical sharding is enabled for a query, the combined total number of interval splits and vertical shards is kept below this value.")
89
+
f.DurationVar(&cfg.MaxFetchedDataDurationPerQuery, "querier.max-fetched-data-duration-per-query", 0, "[EXPERIMENTAL] Max total duration of data fetched from storage by all query shards, 0 disables it. Dynamically uses a multiple of split interval to maintain a total fetched duration of data lower than the value set. It takes into account additional duration fetched by matrix selectors and subqueries.")
90
+
}
91
+
72
92
// Middlewares returns list of middlewares that should be applied for range query.
0 commit comments