public DatabaseHealthTracker(IMonitoringADConfigProvider adConfigProvider, ICopyStatusClientLookup statusLookup) : base(TimeSpan.FromSeconds(0.0), TimeSpan.FromSeconds((double)RegistryParameters.MonitoringDHTPeriodicIntervalInSec), "DatabaseHealthTracker") { this.m_adConfigProvider = adConfigProvider; this.m_statusLookup = statusLookup; this.m_healthTable = new DbCopyHealthInfoTable(this.PersistedFilePath); this.m_pamTracker = new PrimaryRoleTracker(); }
// Token: 0x06001371 RID: 4977 RVA: 0x0004EC9C File Offset: 0x0004CE9C public CopyStatusPoller(IMonitoringADConfigProvider adConfigProvider, CopyStatusClientLookupTable statusTable, ActiveManager activeManager) : base(TimeSpan.Zero, CopyStatusPoller.CopyStatusPollerInterval, "CopyStatusPoller") { this.m_adConfigProvider = adConfigProvider; this.m_statusTable = statusTable; this.m_activeManager = activeManager; this.m_rpcThreadsInProgress = new ConcurrentDictionary <AmServerName, bool>(); }
// Token: 0x0600084D RID: 2125 RVA: 0x00028297 File Offset: 0x00026497 public ADConfig(IMonitoringADConfigProvider cfgSource) { this.cfgSource = cfgSource; ReplayServerPerfmon.ADConfigRefreshCalls.RawValue = 0L; ReplayServerPerfmon.ADConfigRefreshCallsPerSec.RawValue = 0L; this.synchronizer = new SynchronizedAction(new Action(this.RunRefresh)); }
public DiskReclaimerManager(IMonitoringADConfigProvider adConfigProvider, ICopyStatusClientLookup statusLookup, IReplicaInstanceManager replicaInstanceManager) : base(TimeSpan.FromSeconds((double)RegistryParameters.DiskReclaimerDelayedStartInSecs), TimeSpan.FromSeconds((double)RegistryParameters.DiskReclaimerPollerIntervalInSecs), "DiskReclaimerManager") { DiskReclaimerManager.Tracer.TraceDebug((long)this.GetHashCode(), "DiskReclaimer instance being constructed"); this.m_adConfigProvider = adConfigProvider; this.m_statusLookup = statusLookup; this.m_replicaInstanceManager = replicaInstanceManager; this.m_volumeManager = new VolumeManager(); }
public DatabaseHealthMonitor(IMonitoringADConfigProvider adConfigProvider, ICopyStatusClientLookup statusLookup) : base(TimeSpan.FromMilliseconds((double)RegistryParameters.DatabaseHealthMonitorPeriodicIntervalInMsec), TimeSpan.FromMilliseconds((double)RegistryParameters.DatabaseHealthMonitorPeriodicIntervalInMsec), "DatabaseHealthMonitor") { this.m_adConfigProvider = adConfigProvider; this.m_statusLookup = statusLookup; this.m_dbAlerts = new DatabaseLevelAlerts(); this.m_propertyUpdateTracker = new PropertyUpdateTracker(); this.stopWatch = new Stopwatch(); }
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; }
// Token: 0x06001319 RID: 4889 RVA: 0x0004D05A File Offset: 0x0004B25A 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; }
public AutoReseedManager(IMonitoringADConfigProvider adConfigProvider, ICopyStatusClientLookup statusLookup, IReplicaInstanceManager replicaInstanceManager) : base(TimeSpan.FromSeconds((double)RegistryParameters.AutoReseedManagerPollerIntervalInSecs), TimeSpan.FromSeconds((double)RegistryParameters.AutoReseedManagerPollerIntervalInSecs), "AutoReseedManager") { AutoReseedManager.Tracer.TraceDebug((long)this.GetHashCode(), "AutoReseedManager instance is now being constructed."); this.m_adConfigProvider = adConfigProvider; this.m_statusLookup = statusLookup; this.m_replicaInstanceManager = replicaInstanceManager; this.m_launcher = new AutoReseedWorkflowLauncher(); this.m_volumeManager = new VolumeManager(); }
internal MonitoringComponent() { IMonitoringADConfigProvider monitoringADConfigProvider = Dependencies.MonitoringADConfigProvider; ICopyStatusClientLookup monitoringCopyStatusClientLookup = Dependencies.MonitoringCopyStatusClientLookup; if (!RegistryParameters.DatabaseHealthMonitorDisabled) { this.DatabaseHealthMonitor = new DatabaseHealthMonitor(monitoringADConfigProvider, monitoringCopyStatusClientLookup); } if (!RegistryParameters.DatabaseHealthTrackerDisabled) { this.DatabaseHealthTracker = new DatabaseHealthTracker(monitoringADConfigProvider, monitoringCopyStatusClientLookup); } if (!RegistryParameters.ReplayLagManagerDisabled) { this.ReplayLagManager = new ReplayLagManager(monitoringADConfigProvider, monitoringCopyStatusClientLookup); } if (!RegistryParameters.SpaceMonitorDisabled) { this.SpaceMonitor = new SpaceMonitor(monitoringADConfigProvider, monitoringCopyStatusClientLookup); } }
// Token: 0x06001318 RID: 4888 RVA: 0x0004D049 File Offset: 0x0004B249 public AvailabilitySensor(IADDatabase database, IMonitoringADConfigProvider adConfigProvider, ICopyStatusClientLookup statusLookup) : this(database, adConfigProvider, statusLookup, 2, AvailabilitySensor.DefaultMaxProbeFreq) { }
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 LogReplayScanControl(IADDatabase database, bool isLagCopy, IMonitoringADConfigProvider adConfigProvider, ICopyStatusClientLookup statusLookup, IPerfmonCounters keepingUpReader) : this(database, isLagCopy, adConfigProvider, statusLookup, keepingUpReader, new LogReplayScanControl.ControlParameters()) { }
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; }
// 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!"); } }