File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
state-sync/state-sync-v2/state-sync-driver/src Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -122,9 +122,9 @@ pub struct StateSyncDriverConfig {
122122impl Default for StateSyncDriverConfig {
123123 fn default ( ) -> Self {
124124 Self {
125- bootstrapping_mode : BootstrappingMode :: ApplyTransactionOutputsFromGenesis ,
125+ bootstrapping_mode : BootstrappingMode :: ExecuteOrApplyFromGenesis ,
126126 commit_notification_timeout_ms : 5000 ,
127- continuous_syncing_mode : ContinuousSyncingMode :: ApplyTransactionOutputs ,
127+ continuous_syncing_mode : ContinuousSyncingMode :: ExecuteTransactionsOrApplyOutputs ,
128128 enable_auto_bootstrapping : false ,
129129 fallback_to_output_syncing_secs : 180 , // 3 minutes
130130 progress_check_interval_ms : 100 ,
Original file line number Diff line number Diff line change @@ -503,6 +503,11 @@ impl<
503503 self . get_continuous_syncing_mode ( )
504504 {
505505 self . output_fallback_handler . fallback_to_outputs ( ) ;
506+ metrics:: set_gauge (
507+ & metrics:: DRIVER_FALLBACK_MODE ,
508+ ExecutingComponent :: ContinuousSyncer . get_label ( ) ,
509+ 1 ,
510+ ) ;
506511 }
507512
508513 Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -137,7 +137,8 @@ impl OutputFallbackHandler {
137137
138138 /// Initiates a fallback to output syncing (if we haven't already)
139139 pub fn fallback_to_outputs ( & mut self ) {
140- if self . fallback_start_time . lock ( ) . is_none ( ) {
140+ let missing_fallback_start_time = self . fallback_start_time . lock ( ) . is_none ( ) ;
141+ if missing_fallback_start_time {
141142 self . set_fallback_start_time ( self . time_service . now ( ) ) ;
142143 info ! ( LogSchema :: new( LogEntry :: Driver ) . message( & format!(
143144 "Falling back to output syncing for at least {:?} seconds!" ,
You can’t perform that action at this time.
0 commit comments