Query splitting: limit retries (#95364)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user