// Token: 0x06001DCE RID: 7630 RVA: 0x000885BC File Offset: 0x000867BC public LogReplayScanControl(IADDatabase database, bool isLagCopy, IMonitoringADConfigProvider adConfigProvider, ICopyStatusClientLookup statusLookup, IPerfmonCounters keepingUpReader, LogReplayScanControl.ControlParameters parameters) { this.sensor = new AvailabilitySensor(database, adConfigProvider, statusLookup, parameters.MinAvailablePassiveCopies + 1, parameters.MaxProbeFreq); this.isLagCopy = isLagCopy; this.Database = database; this.Parameters = parameters; this.keepingUp = keepingUpReader; }
public SpaceMonitor(IMonitoringADConfigProvider adConfigProvider, ICopyStatusClientLookup statusLookup) : base(TimeSpan.FromSeconds((double)RegistryParameters.SpaceMonitorPollerIntervalInSec), TimeSpan.FromSeconds((double)RegistryParameters.SpaceMonitorPollerIntervalInSec), "SpaceMonitor") { this.m_adConfigProvider = adConfigProvider; this.m_statusLookup = statusLookup; }
public AvailabilitySensor(IADDatabase database, IMonitoringADConfigProvider adConfigProvider, ICopyStatusClientLookup statusLookup, int minCopies, TimeSpan maxProbeFreq) { this.Database = database; this.ADConfigProvider = adConfigProvider; this.CopyStatusLookup = statusLookup; this.MinAvailableCopies = minCopies; this.MaxProbeFreq = maxProbeFreq; }
// Token: 0x06001DCD RID: 7629 RVA: 0x000885A8 File Offset: 0x000867A8 public LogReplayScanControl(IADDatabase database, bool isLagCopy, IMonitoringADConfigProvider adConfigProvider, ICopyStatusClientLookup statusLookup, IPerfmonCounters keepingUpReader) : this(database, isLagCopy, adConfigProvider, statusLookup, keepingUpReader, new LogReplayScanControl.ControlParameters()) { }
protected DatabaseValidatorBase(IADDatabase database, int numHealthyCopiesMinimum, int numHealthyPassiveCopiesMinimum, ICopyStatusClientLookup statusLookup, IMonitoringADConfig adConfig, PropertyUpdateTracker propertyUpdateTracker = null, bool isCopyRemoval = false, bool ignoreActivationDisfavored = true, bool ignoreMaintenanceChecks = true, bool ignoreTooManyActivesCheck = true, bool shouldSkipEvents = true) { this.m_database = database; this.m_statusLookup = statusLookup; this.m_adConfig = adConfig; this.m_propertyUpdateTracker = propertyUpdateTracker; if (this.m_propertyUpdateTracker == null) { this.m_propertyUpdateTracker = new PropertyUpdateTracker(); } this.m_isCopyRemoval = isCopyRemoval; this.m_ignoreActivationDisfavored = ignoreActivationDisfavored; this.m_ignoreMaintenanceChecks = ignoreMaintenanceChecks; this.m_ignoreTooManyActivesCheck = ignoreTooManyActivesCheck; this.m_skipEvents = shouldSkipEvents; this.m_replayStateRegKey = string.Format("SOFTWARE\\Microsoft\\ExchangeServer\\v15\\Replay\\State\\{0}", database.Guid.ToString()); this.m_result = new DatabaseValidationResult(database.Name, database.Guid, adConfig.TargetServerName, numHealthyCopiesMinimum, numHealthyPassiveCopiesMinimum); this.m_errors = new Dictionary <AmServerName, string>(5); }
public AvailabilitySensor(IADDatabase database, IMonitoringADConfigProvider adConfigProvider, ICopyStatusClientLookup statusLookup) : this(database, adConfigProvider, statusLookup, 2, AvailabilitySensor.DefaultMaxProbeFreq) { }
protected DatabaseValidatorBase(IADDatabase database, int numHealthyCopiesMinimum, ICopyStatusClientLookup statusLookup, IMonitoringADConfig adConfig, PropertyUpdateTracker propertyUpdateTracker = null, bool isCopyRemoval = false, bool ignoreActivationDisfavored = true, bool ignoreMaintenanceChecks = true, bool ignoreTooManyActivesCheck = true, bool shouldSkipEvents = true) : this(database, numHealthyCopiesMinimum, 0, statusLookup, adConfig, propertyUpdateTracker, isCopyRemoval, ignoreActivationDisfavored, ignoreMaintenanceChecks, ignoreTooManyActivesCheck, shouldSkipEvents) { }
private bool IsCopyHealthy(CopyStatusClientCachedEntry status, CopyStatusClientCachedEntry activeStatus, ICopyStatusClientLookup statusLookup) { DatabaseValidationCheck.Arguments arguments = new DatabaseValidationCheck.Arguments(status.ServerContacted, status.ActiveServer, this.Database, status, activeStatus, statusLookup, this.m_adConfig, this.m_propertyUpdateTracker, this.m_ignoreActivationDisfavored, this.m_isCopyRemoval, this.m_ignoreMaintenanceChecks, this.m_ignoreTooManyActivesCheck); DatabaseValidationMultiChecks databaseValidationMultiChecks = status.IsActive ? this.ActiveCopyChecks : this.PassiveCopyChecks; foreach (DatabaseValidationCheck databaseValidationCheck in databaseValidationMultiChecks) { LocalizedString empty = LocalizedString.Empty; switch (databaseValidationCheck.Validate(arguments, ref empty)) { case DatabaseValidationCheck.Result.Warning: if (!this.m_skipEvents) { ReplayCrimsonEvents.DatabaseCopyValidationCheckWarning.LogPeriodic <string, string, string>(arguments.DatabaseCopyName.GetHashCode() ^ databaseValidationCheck.CheckName.GetHashCode(), DiagCore.DefaultEventSuppressionInterval, arguments.DatabaseCopyName, databaseValidationCheck.CheckName, EventUtil.TruncateStringInput(empty, 32766)); } break; case DatabaseValidationCheck.Result.Failed: this.RecordError(status.ServerContacted, empty); if (databaseValidationCheck.CheckId == DatabaseValidationCheck.ID.DatabaseCheckCopyStatusNotStale) { this.m_isAnyCachedCopyStatusStale = true; } return(false); } } return(true); }
// Token: 0x06001447 RID: 5191 RVA: 0x00051B88 File Offset: 0x0004FD88 public Arguments(AmServerName targetServer, AmServerName activeServer, IADDatabase database, CopyStatusClientCachedEntry copyStatus, CopyStatusClientCachedEntry activeCopyStatus, ICopyStatusClientLookup statusLookup, IMonitoringADConfig adConfig, PropertyUpdateTracker propertyUpdateTracker = null, bool ignoreActivationDisfavored = true, bool isCopyRemoval = false, bool ignoreMaintenanceChecks = true, bool ignoreTooManyActivesCheck = true) { this.m_targetServer = targetServer; this.m_activeServer = activeServer; this.m_database = database; this.m_copyStatus = copyStatus; this.m_activeCopyStatus = activeCopyStatus; this.m_statusLookup = statusLookup; this.m_adConfig = adConfig; this.m_propertyUpdateTracker = propertyUpdateTracker; this.m_ignoreActivationDisfavored = ignoreActivationDisfavored; this.m_isCopyRemoval = isCopyRemoval; this.m_ignoreMaintenanceChecks = ignoreMaintenanceChecks; this.m_ignoreTooManyActivesCheck = ignoreTooManyActivesCheck; if (this.m_activeServer == null) { this.m_activeServer = AmServerName.Empty; } this.m_dbName = database.Name; this.m_dbCopyName = string.Format("{0}\\{1}", database.Name, targetServer.NetbiosName); }
// Token: 0x060013A3 RID: 5027 RVA: 0x0004FBE0 File Offset: 0x0004DDE0 public DatabaseAvailabilityValidator(IADDatabase database, int numAvailableCopiesMinimum, ICopyStatusClientLookup statusLookup, IMonitoringADConfig adConfig, PropertyUpdateTracker propertyUpdateTracker = null, bool shouldSkipEvents = true) : base(database, numAvailableCopiesMinimum, statusLookup, adConfig, propertyUpdateTracker, false, false, false, false, shouldSkipEvents) { }
// Token: 0x06001A34 RID: 6708 RVA: 0x0006DEA4 File Offset: 0x0006C0A4 protected override void PollerThread() { Thread.CurrentThread.Name = "FullServerReseeder"; FullServerReseeder.Tracer.TraceDebug((long)this.GetHashCode(), "FullServerReseeder: Starting the main seeding thread."); ReplayCrimsonEvents.FullServerSeedStarted.Log(); while (!this.m_fShutdown) { IMonitoringADConfigProvider monitoringADConfigProvider = Dependencies.MonitoringADConfigProvider; ICopyStatusClientLookup monitoringCopyStatusClientLookup = Dependencies.MonitoringCopyStatusClientLookup; try { AmServerName localComputerName = AmServerName.LocalComputerName; IMonitoringADConfig config = monitoringADConfigProvider.GetConfig(true); this.m_localServer = config.TargetMiniServer; IEnumerable <CopyStatusClientCachedEntry> copyStatusesByServer = monitoringCopyStatusClientLookup.GetCopyStatusesByServer(localComputerName, config.DatabaseMap[localComputerName], CopyStatusClientLookupFlags.None); IEnumerable <CopyStatusClientCachedEntry> enumerable = from status in copyStatusesByServer where this.IsCopyReseedable(status) select status; IEnumerable <CopyStatusClientCachedEntry> source = from status in copyStatusesByServer where this.IsCopyReseeding(status) select status; List <CopyStatusClientCachedEntry> list = new List <CopyStatusClientCachedEntry>(20); List <CopyStatusClientCachedEntry> list2 = new List <CopyStatusClientCachedEntry>(20); foreach (CopyStatusClientCachedEntry copyStatusClientCachedEntry in enumerable) { if (!this.m_resumesAttempted.ContainsKey(copyStatusClientCachedEntry.DbGuid)) { list.Add(copyStatusClientCachedEntry); } else if (!this.m_reseedsAttempted.ContainsKey(copyStatusClientCachedEntry.DbGuid)) { list2.Add(copyStatusClientCachedEntry); } } if (list.Count == 0 && list2.Count == 0) { FullServerReseeder.Tracer.TraceDebug <int, int>((long)this.GetHashCode(), "FullServerReseeder: Exiting because there is nothing more to do. {0} copies resumed, and {1} copies reseeded.", this.m_resumesAttempted.Count, this.m_reseedsAttempted.Count); ReplayCrimsonEvents.FullServerSeedCompleted.Log <int, int>(this.m_resumesAttempted.Count, this.m_reseedsAttempted.Count); this.PrepareToStop(); ThreadPool.QueueUserWorkItem(delegate(object state) { this.Stop(); }); break; } list.ForEach(delegate(CopyStatusClientCachedEntry status) { this.TryResumeCopy(status); }); int num = source.Count <CopyStatusClientCachedEntry>(); FullServerReseeder.Tracer.TraceDebug <int>((long)this.GetHashCode(), "FullServerReseeder: Currently, {0} seeds are concurrently running.", num); foreach (CopyStatusClientCachedEntry status2 in list2) { if (num >= this.m_args.MaxSeedsInParallel) { FullServerReseeder.Tracer.TraceDebug <int>((long)this.GetHashCode(), "FullServerReseeder: Number of concurrent reseeds exceeds MaxSeedsInParallel ({0}). Waiting for seeds to complete before starting new seeds.", this.m_args.MaxSeedsInParallel); break; } num++; this.TryReseedCopy(status2); } } catch (MonitoringADConfigException ex) { FullServerReseeder.Tracer.TraceError <MonitoringADConfigException>((long)this.GetHashCode(), "FullServerReseeder: Encountered an error when querying AD config: {0}", ex); ReplayCrimsonEvents.FullServerSeedError.Log <string>(ex.Message); } FullServerReseeder.Tracer.TraceDebug <int>((long)this.GetHashCode(), "FullServerReseeder: Sleeping for {0} secs and retrying.", this.RetryIntervalSecs); if (this.m_shutdownEvent.WaitOne(this.RetryIntervalSecs * 1000, false)) { break; } } if (this.m_fShutdown) { FullServerReseeder.Tracer.TraceDebug((long)this.GetHashCode(), "FullServerReseeder: Exiting because of PrepareToStop() called!"); } }
// Token: 0x0600153A RID: 5434 RVA: 0x00053F67 File Offset: 0x00052167 public ReplayLagManager(IMonitoringADConfigProvider adConfigProvider, ICopyStatusClientLookup statusLookup) : base(TimeSpan.FromMilliseconds((double)RegistryParameters.ReplayLagManagerPollerIntervalInMsec), TimeSpan.FromMilliseconds((double)RegistryParameters.ReplayLagManagerPollerIntervalInMsec), "ReplayLagManager") { this.m_adConfigProvider = adConfigProvider; this.m_statusLookup = statusLookup; this.m_errorSuppression = new TransientDatabaseErrorSuppression(); }
public DatabaseRedundancyValidator(IADDatabase database, int numHealthyCopiesMinimum, ICopyStatusClientLookup statusLookup, IMonitoringADConfig adConfig, PropertyUpdateTracker propertyUpdateTracker, bool isCopyRemoval, bool ignoreActivationDisfavored, bool ignoreMaintenanceChecks, bool ignoreTooManyActivesCheck, bool shouldSkipEvents = true) : base(database, numHealthyCopiesMinimum, statusLookup, adConfig, propertyUpdateTracker, isCopyRemoval, ignoreActivationDisfavored, ignoreMaintenanceChecks, ignoreTooManyActivesCheck, shouldSkipEvents) { }