From b069fd81b29d27cb8826eeca90b12d7c532a7927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Farkas?= Date: Wed, 22 Feb 2023 09:16:05 +0100 Subject: [PATCH] loki: query splitting: more robust check (#63542) --- public/app/plugins/datasource/loki/queryUtils.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/datasource/loki/queryUtils.ts b/public/app/plugins/datasource/loki/queryUtils.ts index 79d1088e053..ba2ebb6f574 100644 --- a/public/app/plugins/datasource/loki/queryUtils.ts +++ b/public/app/plugins/datasource/loki/queryUtils.ts @@ -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; }