Query splitting: limit retries (#95364)

This commit is contained in:
Matias Chomicki 2024-10-25 10:53:03 +02:00 committed by GitHub
parent 5ee5c7af7b
commit 226dcdde0f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -128,7 +128,7 @@ export function runSplitGroupedQueries(datasource: LokiDatasource, requests: Lok
const key = `${requestN}-${requestGroup}`;
const retries = retriesMap.get(key) ?? 0;
if (retries > 3) {
if (retries > 0) {
return false;
}

View File

@ -40,7 +40,7 @@ import { LokiQuery } from './types';
* . nextRequest() will use the current cycle and group size to determine the next request or complete execution with done().
* - If the response is unsuccessful:
* . If the response is not a query error, and the group size bigger than 1, it will decrease the group size.
* . If the group size is already 1, it will retry the request up to 4 times.
* . If the group size is already 1, it will retry the request up to 2 times.
* . If there are retry attempts, it will retry the current cycle, or else stop querying.
* - Once all request groups have been executed, it will be done().
*/
@ -122,7 +122,7 @@ function splitQueriesByStreamShard(
const key = `${group}_${cycle}`;
const retries = retriesMap.get(key) ?? 0;
if (retries > 3) {
if (retries > 1) {
shouldStop = true;
return false;
}