mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Query splitting: limit retries (#95364)
This commit is contained in:
parent
5ee5c7af7b
commit
226dcdde0f
@ -128,7 +128,7 @@ export function runSplitGroupedQueries(datasource: LokiDatasource, requests: Lok
|
|||||||
|
|
||||||
const key = `${requestN}-${requestGroup}`;
|
const key = `${requestN}-${requestGroup}`;
|
||||||
const retries = retriesMap.get(key) ?? 0;
|
const retries = retriesMap.get(key) ?? 0;
|
||||||
if (retries > 3) {
|
if (retries > 0) {
|
||||||
return false;
|
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().
|
* . 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 unsuccessful:
|
||||||
* . If the response is not a query error, and the group size bigger than 1, it will decrease the group size.
|
* . 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.
|
* . 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().
|
* - Once all request groups have been executed, it will be done().
|
||||||
*/
|
*/
|
||||||
@ -122,7 +122,7 @@ function splitQueriesByStreamShard(
|
|||||||
const key = `${group}_${cycle}`;
|
const key = `${group}_${cycle}`;
|
||||||
const retries = retriesMap.get(key) ?? 0;
|
const retries = retriesMap.get(key) ?? 0;
|
||||||
|
|
||||||
if (retries > 3) {
|
if (retries > 1) {
|
||||||
shouldStop = true;
|
shouldStop = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user