@@ -133,8 +133,13 @@ pub struct EnvVars {
133
133
/// Ceiling for the backoff retry of non-deterministic errors.
134
134
///
135
135
/// Set by the environment variable `GRAPH_SUBGRAPH_ERROR_RETRY_CEIL_SECS`
136
- /// (expressed in seconds). The default value is 1800s (30 minutes).
136
+ /// (expressed in seconds). The default value is 3600s (60 minutes).
137
137
pub subgraph_error_retry_ceil : Duration ,
138
+ /// Jitter factor for the backoff retry of non-deterministic errors.
139
+ ///
140
+ /// Set by the environment variable `GRAPH_SUBGRAPH_ERROR_RETRY_JITTER`
141
+ /// (clamped between 0.0 and 1.0). The default value is 0.2.
142
+ pub subgraph_error_retry_jitter : f64 ,
138
143
/// Experimental feature.
139
144
///
140
145
/// Set by the flag `GRAPH_ENABLE_SELECT_BY_SPECIFIC_ATTRIBUTES`. Off by
@@ -210,6 +215,7 @@ impl EnvVars {
210
215
subgraph_max_data_sources : inner. subgraph_max_data_sources . 0 ,
211
216
disable_fail_fast : inner. disable_fail_fast . 0 ,
212
217
subgraph_error_retry_ceil : Duration :: from_secs ( inner. subgraph_error_retry_ceil_in_secs ) ,
218
+ subgraph_error_retry_jitter : inner. subgraph_error_retry_jitter ,
213
219
enable_select_by_specific_attributes : inner. enable_select_by_specific_attributes . 0 ,
214
220
log_trigger_data : inner. log_trigger_data . 0 ,
215
221
explorer_ttl : Duration :: from_secs ( inner. explorer_ttl_in_secs ) ,
@@ -313,8 +319,10 @@ struct Inner {
313
319
subgraph_max_data_sources : NoUnderscores < usize > ,
314
320
#[ envconfig( from = "GRAPH_DISABLE_FAIL_FAST" , default = "false" ) ]
315
321
disable_fail_fast : EnvVarBoolean ,
316
- #[ envconfig( from = "GRAPH_SUBGRAPH_ERROR_RETRY_CEIL_SECS" , default = "1800 " ) ]
322
+ #[ envconfig( from = "GRAPH_SUBGRAPH_ERROR_RETRY_CEIL_SECS" , default = "3600 " ) ]
317
323
subgraph_error_retry_ceil_in_secs : u64 ,
324
+ #[ envconfig( from = "GRAPH_SUBGRAPH_ERROR_RETRY_JITTER" , default = "0.2" ) ]
325
+ subgraph_error_retry_jitter : f64 ,
318
326
#[ envconfig( from = "GRAPH_ENABLE_SELECT_BY_SPECIFIC_ATTRIBUTES" , default = "false" ) ]
319
327
enable_select_by_specific_attributes : EnvVarBoolean ,
320
328
#[ envconfig( from = "GRAPH_LOG_TRIGGER_DATA" , default = "false" ) ]
0 commit comments