loki: query splitting: more robust check (#63542)

This commit is contained in:
Gábor Farkas
2023-02-22 09:16:05 +01:00
committed by GitHub
parent 3949706182
commit b069fd81b2

View File

@@ -307,9 +307,11 @@ export function getStreamSelectorsFromQuery(query: string): string[] {
export function requestSupportsPartitioning(allQueries: LokiQuery[]) {
const queries = allQueries.filter((query) => !query.hide);
/*
* For now, we will not split when more than 1 query is requested.
* For now, we only split if there is a single query.
* - we do not split for zero queries
* - we do not split for multiple queries
*/
if (queries.length > 1) {
if (queries.length !== 1) {
return false;
}