private void SyncModeSelectorOnPreparing(object?sender, SyncModeChangedEventArgs e) { if ((e.Current & SyncMode.Full) == SyncMode.Full) { lock (_transitionLock) { if (_isAfterBeam) { // we do it only once - later we stay forever in full sync mode return; } _isAfterBeam = true; if (_logger.IsInfo) { _logger.Info("Setting block action to shelving."); } _blockAction = Shelve; } CancelAllBeamSyncTasks(); Task.WhenAll(_beamProcessTasks).Wait(); // sync mode selector is waiting for beam syncing blocks to stop } }
private void SyncModeSelectorOnPreparing(object?sender, SyncModeChangedEventArgs e) { // do nothing, the beam processor is cancelling beam executors now and they may be still writing }
public static bool IsBeamSyncFinished(this SyncModeChangedEventArgs e) { bool isBeamSyncFinished = (e.Current & (SyncMode.Full | SyncMode.WaitingForBlock)) != SyncMode.None; return(isBeamSyncFinished); }
private void SyncModeSelectorOnChanging(object?sender, SyncModeChangedEventArgs e) { }