private static void UpdateBackupInfo(DatabaseCopyStatusEntry entry, RpcDatabaseCopyStatus2 copyStatus) { entry.m_latestFullBackupTime = DumpsterStatisticsEntry.ToNullableLocalDateTime(copyStatus.LatestFullBackupTime); DateTime?dateTime = DumpsterStatisticsEntry.ToNullableLocalDateTime(copyStatus.LatestIncrementalBackupTime); if (dateTime != null && dateTime.Value >= entry.m_latestFullBackupTime) { entry.m_latestIncrementalBackupTime = dateTime; } dateTime = DumpsterStatisticsEntry.ToNullableLocalDateTime(copyStatus.LatestDifferentialBackupTime); if (dateTime != null && dateTime.Value >= entry.m_latestFullBackupTime) { entry.m_latestDifferentialBackupTime = dateTime; } entry.m_latestCopyBackupTime = DumpsterStatisticsEntry.ToNullableLocalDateTime(copyStatus.LatestCopyBackupTime); if (entry.m_latestFullBackupTime != null) { entry.m_snapshotLatestFullBackup = new bool?(copyStatus.SnapshotLatestFullBackup); entry.m_snapshotBackup = new bool?(copyStatus.SnapshotLatestFullBackup); } if (entry.m_latestIncrementalBackupTime != null) { entry.m_snapshotLatestIncrementalBackup = new bool?(copyStatus.SnapshotLatestIncrementalBackup); } if (entry.m_latestDifferentialBackupTime != null) { entry.m_snapshotLatestDifferentialBackup = new bool?(copyStatus.SnapshotLatestDifferentialBackup); } if (entry.m_latestCopyBackupTime != null) { entry.m_snapshotLatestCopyBackup = new bool?(copyStatus.SnapshotLatestCopyBackup); } }
protected override DatabaseValidationCheck.Result ValidateInternal(DatabaseValidationCheck.Arguments args, ref LocalizedString error) { RpcDatabaseCopyStatus2 copyStatus = args.Status.CopyStatus; CopyStatusEnum copyStatus2 = copyStatus.CopyStatus; switch (copyStatus2) { case CopyStatusEnum.DisconnectedAndHealthy: case CopyStatusEnum.Healthy: break; default: if (copyStatus2 != CopyStatusEnum.SeedingSource) { DatabaseValidationCheck.Tracer.TraceError((long)this.GetHashCode(), "{0}: Passive database copy '{1}' is in state '{2}'. Returning Failed! StatusFetched at {3}", new object[] { base.CheckName, args.DatabaseCopyName, copyStatus.CopyStatus, copyStatus.StatusRetrievedTime }); error = ReplayStrings.DbValidationPassiveCopyUnhealthyState(args.DatabaseCopyName, copyStatus.CopyStatus.ToString(), string.IsNullOrEmpty(copyStatus.ErrorMessage) ? ReplayStrings.AmBcsNoneSpecified : copyStatus.ErrorMessage, string.IsNullOrEmpty(copyStatus.SuspendComment) ? ReplayStrings.AmBcsNoneSpecified : copyStatus.SuspendComment); return(DatabaseValidationCheck.Result.Failed); } break; } DatabaseValidationCheck.Tracer.TraceDebug((long)this.GetHashCode(), "{0}: Passive database copy '{1}' is in state '{2}'. Returning Passed. StatusFetched at {3}", new object[] { base.CheckName, args.DatabaseCopyName, copyStatus.CopyStatus, copyStatus.StatusRetrievedTime }); return(DatabaseValidationCheck.Result.Passed); }
public void CollectConnectionStatus(RpcDatabaseCopyStatus2 copyStatus) { TcpListener tcpListener = RemoteDataProvider.GetTcpListener(); if (tcpListener == null) { ExTraceGlobals.MonitoredDatabaseTracer.TraceDebug <string>((long)this.GetHashCode(), "CollectConnectionStatus ( {0} ): tcpListener is null, so skipping collecting connection status.", this.DatabaseName); return; } NetworkChannel networkChannel = tcpListener.FindSeedingChannel(this); if (networkChannel != null) { ConnectionStatus obj = new ConnectionStatus(networkChannel.PartnerNodeName, networkChannel.NetworkName, null, ConnectionDirection.Outgoing, true); byte[] seedingNetwork = Serialization.ObjectToBytes(obj); copyStatus.SeedingNetwork = seedingNetwork; } List <ConnectionStatus> list = new List <ConnectionStatus>(); lock (this.m_activeLogCopyClients) { foreach (LogCopyServerContext logCopyServerContext in this.m_activeLogCopyClients) { ConnectionStatus item = logCopyServerContext.CollectConnectionStatus(); list.Add(item); } } ConnectionStatus[] obj2 = list.ToArray(); byte[] outgoingConnections = Serialization.ObjectToBytes(obj2); copyStatus.OutgoingConnections = outgoingConnections; }
// Token: 0x06000682 RID: 1666 RVA: 0x0001F798 File Offset: 0x0001D998 public static bool IsHealthyOrDisconnected(string dbName, RpcDatabaseCopyStatus2 status, AmServerName targetServer, ref LocalizedString error) { bool result = true; if (status.HAComponentOffline) { result = false; error = ReplayStrings.AmBcsDatabaseCopyIsHAComponentOffline(dbName, targetServer.NetbiosName); } else if (status.ActivationSuspended && status.CopyStatus != CopyStatusEnum.Suspended && status.CopyStatus != CopyStatusEnum.FailedAndSuspended && status.CopyStatus != CopyStatusEnum.Seeding) { result = false; error = ReplayStrings.AmBcsDatabaseCopyActivationSuspended(dbName, targetServer.NetbiosName, string.IsNullOrEmpty(status.SuspendComment) ? ReplayStrings.AmBcsNoneSpecified : status.SuspendComment); } else if (status.CopyStatus == CopyStatusEnum.Seeding) { result = false; error = ReplayStrings.AmBcsDatabaseCopySeeding(dbName, targetServer.NetbiosName); } else if (status.CopyStatus == CopyStatusEnum.Failed || status.CopyStatus == CopyStatusEnum.FailedAndSuspended) { result = false; error = ReplayStrings.AmBcsDatabaseCopyFailed(dbName, targetServer.NetbiosName, string.IsNullOrEmpty(status.ErrorMessage) ? ReplayStrings.AmBcsNoneSpecified : status.ErrorMessage); } else if (status.CopyStatus == CopyStatusEnum.Suspended) { result = false; error = ReplayStrings.AmBcsDatabaseCopySuspended(dbName, targetServer.NetbiosName, string.IsNullOrEmpty(status.SuspendComment) ? ReplayStrings.AmBcsNoneSpecified : status.SuspendComment); } return(result); }
protected override DatabaseValidationCheck.Result ValidateInternal(DatabaseValidationCheck.Arguments args, ref LocalizedString error) { AmServerName targetServer = args.TargetServer; RpcDatabaseCopyStatus2 copyStatus = args.Status.CopyStatus; if (copyStatus.CopyStatus == CopyStatusEnum.Dismounted || copyStatus.CopyStatus == CopyStatusEnum.Dismounting) { if (!string.IsNullOrEmpty(copyStatus.ErrorMessage)) { error = ReplayStrings.DbAvailabilityActiveCopyDismountedError(args.DatabaseName, targetServer.NetbiosName, copyStatus.ErrorMessage); return(DatabaseValidationCheck.Result.Failed); } DatabaseValidationCheck.Tracer.TraceDebug <string, string, CopyStatusEnum>((long)this.GetHashCode(), "{0}: Active database copy '{1}' is dismounted/dismounting. CopyStatus={2}. Returning Warning.", base.CheckName, args.DatabaseCopyName, copyStatus.CopyStatus); error = ReplayStrings.DbAvailabilityActiveCopyMountState(args.DatabaseName, targetServer.NetbiosName, copyStatus.CopyStatus.ToString()); return(DatabaseValidationCheck.Result.Warning); } else { if (copyStatus.CopyStatus == CopyStatusEnum.Mounted) { DatabaseValidationCheck.Tracer.TraceDebug <string, string, CopyStatusEnum>((long)this.GetHashCode(), "{0}: Active database copy '{1}' is mounted. CopyStatus={2}. Returning Passed.", base.CheckName, args.DatabaseCopyName, copyStatus.CopyStatus); return(DatabaseValidationCheck.Result.Passed); } if (copyStatus.CopyStatus == CopyStatusEnum.Mounting) { DatabaseValidationCheck.Tracer.TraceDebug <string, string, CopyStatusEnum>((long)this.GetHashCode(), "{0}: Active database copy '{1}' is mounting. CopyStatus={2}. Returning Warning.", base.CheckName, args.DatabaseCopyName, copyStatus.CopyStatus); error = ReplayStrings.DbAvailabilityActiveCopyMountState(args.DatabaseName, targetServer.NetbiosName, copyStatus.CopyStatus.ToString()); return(DatabaseValidationCheck.Result.Warning); } error = ReplayStrings.DbAvailabilityActiveCopyUnknownState(args.DatabaseName, targetServer.NetbiosName, copyStatus.CopyStatus.ToString()); return(DatabaseValidationCheck.Result.Failed); } }
private bool RunChecks(AmServerName sourceServer, AmServerName targetServer, RpcDatabaseCopyStatus2 status, AmBcsChecks amBcsChecks, out AmBcsChecks completedChecks, ref LocalizedString error) { bool flag = this.HasNotBeenTried(targetServer, ref error); completedChecks = AmBcsChecks.None; if (flag) { if (this.m_bcsContext.ActionCode.IsMountOrRemountOperation && AmServerName.IsEqual(sourceServer, targetServer)) { AmTrace.Debug("BCS: Target server '{0}' is skipping validation checks to allow mount to take place for database '{1}'.", new object[] { targetServer.NetbiosName, this.m_bcsContext.GetDatabaseNameOrGuid() }); flag = true; } else { AmBcsCopyValidation amBcsCopyValidation = new AmBcsCopyValidation(this.m_bcsContext.DatabaseGuid, this.m_bcsContext.GetDatabaseNameOrGuid(), amBcsChecks, sourceServer, targetServer, status, this.m_bcsContext.ErrorLogger, this.m_bcsContext.SkipValidationChecks, this.m_bcsContext.ComponentStateWrapper); flag = amBcsCopyValidation.RunChecks(ref error); completedChecks = amBcsCopyValidation.CompletedChecks; } } else { AmTrace.Debug("BCS: Target server '{0}' has already been tried for database '{1}'.", new object[] { targetServer.NetbiosName, this.m_bcsContext.GetDatabaseNameOrGuid() }); } return(flag); }
protected override Exception ExecuteInternal(AutoReseedWorkflowState state) { RpcDatabaseCopyStatus2 copyStatus = base.Context.TargetCopyStatus.CopyStatus; TimeSpan timeSpan = TimeSpan.FromSeconds((double)RegistryParameters.AutoReseedDbFailedPeriodicIntervalInSecs); base.TraceDebug("Calling SuspendAndFailLocalDatabaseCopy() ...", new object[0]); return(DatabaseTasks.SuspendAndFailLocalDatabaseCopy(base.Context.Database, ReplayStrings.AutoReseedFailedCopyWorkflowSuspendedCopy(timeSpan.ToString()), copyStatus.ErrorMessage, copyStatus.ErrorEventId, copyStatus.ResumeBlocked, copyStatus.ReseedBlocked, copyStatus.InPlaceReseedBlocked)); }
private static void UpdateReplayLagStatus(DatabaseCopyStatusEntry entry, RpcDatabaseCopyStatus2 copyStatus) { if (copyStatus.ReplayLagEnabled != ReplayLagEnabledEnum.Unknown) { ReplayLagStatus replayLagStatus = new ReplayLagStatus(copyStatus.ReplayLagEnabled == ReplayLagEnabledEnum.Enabled, copyStatus.ConfiguredReplayLagTime, copyStatus.ActualReplayLagTime, copyStatus.ReplayLagPercentage, GetMailboxDatabaseCopyStatus.ConvertLagPlayDownReason(copyStatus.ReplayLagPlayDownReason), copyStatus.ReplayLagDisabledReason); entry.m_replayLagStatus = replayLagStatus; } }
private static void UpdateDatabaseSeedStatus(DatabaseCopyStatusEntry entry, RpcDatabaseCopyStatus2 copyStatus) { if (copyStatus.CopyStatus == CopyStatusEnum.Seeding) { DatabaseSeedStatus dbSeedStatus = new DatabaseSeedStatus(copyStatus.DbSeedingPercent, copyStatus.DbSeedingKBytesRead, copyStatus.DbSeedingKBytesWritten, copyStatus.DbSeedingKBytesReadPerSec, copyStatus.DbSeedingKBytesWrittenPerSec); entry.m_dbSeedStatus = dbSeedStatus; } }
protected override void InternalRun() { if (this.m_ReplayConfigs.Count == 0) { ExTraceGlobals.HealthChecksTracer.TraceDebug((long)this.GetHashCode(), "InternalRun(): m_ReplayConfigs has no entries. Returning from check."); return; } foreach (ReplayConfiguration replayConfiguration in this.m_ReplayConfigs) { base.InstanceIdentity = replayConfiguration.IdentityGuid.ToString().ToLowerInvariant(); if (this.ShouldCheckConfig(replayConfiguration)) { ExTraceGlobals.HealthChecksTracer.TraceDebug((long)this.GetHashCode(), "InternalRun(): ReplayConfiguration '{0}' of type '{1}' on server '{2}' will now be processed by check '{3}'.", new object[] { replayConfiguration.DisplayName, replayConfiguration.Type.ToString(), replayConfiguration.ServerName, base.Title }); try { if (this.UseReplayRpc()) { RpcDatabaseCopyStatus2 copyStatus = null; if ((this.m_CopyStatuses != null && this.m_CopyStatuses.TryGetValue(replayConfiguration.IdentityGuid, out copyStatus)) || replayConfiguration.Type == ReplayConfigType.RemoteCopySource) { if (this.RunIndividualCheck(replayConfiguration, copyStatus)) { base.ReportPassedInstance(); } } else { base.FailContinue(Strings.DatabaseCopyRpcResultNotFound(new LocalizedReplayConfigType(replayConfiguration.Type).ToString(), replayConfiguration.DisplayName)); } } else if (this.RunIndividualCheck(replayConfiguration, null)) { base.ReportPassedInstance(); } continue; } finally { base.InstanceIdentity = null; } } ExTraceGlobals.HealthChecksTracer.TraceDebug((long)this.GetHashCode(), "InternalRun(): ReplayConfiguration '{0}' of type '{1}' on server '{2}' is being skipped by check '{3}'.", new object[] { replayConfiguration.DisplayName, replayConfiguration.Type.ToString(), replayConfiguration.ServerName, base.Title }); } }
protected override DatabaseValidationCheck.Result ValidateInternal(DatabaseValidationCheck.Arguments args, ref LocalizedString error) { RpcDatabaseCopyStatus2 copyStatus = args.Status.CopyStatus; if (copyStatus.NodeStatus == NodeUpStatusEnum.Down) { error = ReplayStrings.AmBcsTargetNodeDownError(args.TargetServer.NetbiosName); return(DatabaseValidationCheck.Result.Failed); } return(DatabaseValidationCheck.Result.Passed); }
// Token: 0x06000684 RID: 1668 RVA: 0x0001F918 File Offset: 0x0001DB18 public static bool IsRealCopyQueueLengthAcceptable(string dbName, RpcDatabaseCopyStatus2 status, int copyQueueThreshold, AmServerName targetServer, ref LocalizedString error) { long num = Math.Max(0L, status.LastLogGenerated - status.LastLogCopied); bool flag = num <= (long)copyQueueThreshold; if (!flag) { error = ReplayStrings.AmBcsDatabaseCopyQueueLengthTooHigh(dbName, targetServer.NetbiosName, num, (long)copyQueueThreshold); } return(flag); }
// Token: 0x06000683 RID: 1667 RVA: 0x0001F8CC File Offset: 0x0001DACC public static bool IsTotalQueueLengthLessThanMaxThreshold(string dbName, RpcDatabaseCopyStatus2 status, AmServerName targetServer, ref LocalizedString error) { long num = Math.Max(0L, status.LastLogGenerated - status.LastLogReplayed); bool flag = num <= (long)AmBcsCopyValidation.TOTAL_QUEUE_MAX_THRESHOLD; if (!flag) { error = ReplayStrings.AmBcsDatabaseCopyTotalQueueLengthTooHigh(dbName, targetServer.NetbiosName, num, (long)AmBcsCopyValidation.TOTAL_QUEUE_MAX_THRESHOLD); } return(flag); }
internal RpcDatabaseCopyStatus2 GetCopyStatus(RpcGetDatabaseCopyStatusFlags2 flags) { if ((flags & RpcGetDatabaseCopyStatusFlags2.ReadThrough) == RpcGetDatabaseCopyStatusFlags2.None) { return(this.GetCachedCopyStatus(flags)); } RpcDatabaseCopyStatus2 copyStatusWithTimeout = this.GetCopyStatusWithTimeout(flags); CopyStatusServerCachedEntry copyStatusServerCachedEntry = this.UpdateCachedCopyStatus(copyStatusWithTimeout); return(copyStatusServerCachedEntry.CopyStatus); }
// Token: 0x0600068E RID: 1678 RVA: 0x0001FE24 File Offset: 0x0001E024 private bool IsCatalogStatusHealthy(ref LocalizedString error) { RpcDatabaseCopyStatus2 copyStatus = this.CopyStatus; bool flag = copyStatus.ContentIndexStatus == ContentIndexStatusType.Healthy || copyStatus.ContentIndexStatus == ContentIndexStatusType.HealthyAndUpgrading; if (!flag) { error = ReplayStrings.AmBcsDatabaseCopyCatalogUnhealthy(this.DbName, this.TargetServer.NetbiosName, copyStatus.ContentIndexStatus.ToString()); this.ReportCopyStatusFailure(AmBcsChecks.IsCatalogStatusHealthy, error); } return(flag); }
// Token: 0x06000692 RID: 1682 RVA: 0x0001FF74 File Offset: 0x0001E174 private bool IsPassiveSeedingSource(ref LocalizedString error) { RpcDatabaseCopyStatus2 copyStatus = this.CopyStatus; bool flag = copyStatus.CopyStatus != CopyStatusEnum.SeedingSource; if (!flag) { error = ReplayStrings.AmBcsDatabaseCopyIsSeedingSource(this.DbName, this.TargetServer.NetbiosName); this.ReportCopyStatusFailure(AmBcsChecks.IsSeedingSource, error); } return(flag); }
protected override DatabaseValidationCheck.Result ValidateInternal(DatabaseValidationCheck.Arguments args, ref LocalizedString error) { AmServerName targetServer = args.TargetServer; RpcDatabaseCopyStatus2 copyStatus = args.Status.CopyStatus; if (copyStatus.ActivationSuspended) { error = ReplayStrings.AmBcsDatabaseCopyActivationSuspended(args.DatabaseName, targetServer.NetbiosName, string.IsNullOrEmpty(copyStatus.SuspendComment) ? ReplayStrings.AmBcsNoneSpecified : copyStatus.SuspendComment); return(DatabaseValidationCheck.Result.Failed); } return(DatabaseValidationCheck.Result.Passed); }
// Token: 0x0600068D RID: 1677 RVA: 0x0001FDE4 File Offset: 0x0001DFE4 private bool IsHealthyOrDisconnected(ref LocalizedString error) { string dbName = this.DbName; RpcDatabaseCopyStatus2 copyStatus = this.CopyStatus; AmServerName targetServer = this.TargetServer; bool flag = AmBcsCopyValidation.IsHealthyOrDisconnected(dbName, copyStatus, targetServer, ref error); if (!flag) { this.ReportCopyStatusFailure(AmBcsChecks.IsHealthyOrDisconnected, error); } return(flag); }
// Token: 0x06000690 RID: 1680 RVA: 0x0001FECC File Offset: 0x0001E0CC private bool IsReplayQueueLengthAcceptable(ref LocalizedString error) { RpcDatabaseCopyStatus2 copyStatus = this.CopyStatus; long num = Math.Max(0L, copyStatus.LastLogCopied - copyStatus.LastLogReplayed); bool flag = num <= 10L; if (!flag) { error = ReplayStrings.AmBcsDatabaseCopyReplayQueueLengthTooHigh(this.DbName, this.TargetServer.NetbiosName, num, 10L); this.ReportCopyStatusFailure(AmBcsChecks.ReplayQueueLength, error); } return(flag); }
// Token: 0x06000691 RID: 1681 RVA: 0x0001FF30 File Offset: 0x0001E130 private bool IsTotalQueueLengthLessThanMaxThreshold(ref LocalizedString error) { string dbName = this.DbName; RpcDatabaseCopyStatus2 copyStatus = this.CopyStatus; AmServerName targetServer = this.TargetServer; bool flag = AmBcsCopyValidation.IsTotalQueueLengthLessThanMaxThreshold(dbName, copyStatus, targetServer, ref error); if (!flag) { this.ReportCopyStatusFailure(AmBcsChecks.TotalQueueLengthMaxAllowed, error); } return(flag); }
// Token: 0x0600068F RID: 1679 RVA: 0x0001FE8C File Offset: 0x0001E08C private bool IsCopyQueueLengthAcceptable(ref LocalizedString error) { string dbName = this.DbName; RpcDatabaseCopyStatus2 copyStatus = this.CopyStatus; AmServerName targetServer = this.TargetServer; bool flag = AmBcsCopyValidation.IsRealCopyQueueLengthAcceptable(dbName, copyStatus, 10, targetServer, ref error); if (!flag) { this.ReportCopyStatusFailure(AmBcsChecks.CopyQueueLength, error); } return(flag); }
private RpcDatabaseCopyStatus2 GetCopyStatusWithTimeout(RpcGetDatabaseCopyStatusFlags2 flags) { RpcDatabaseCopyStatus2 status = null; TimeSpan invokeTimeout = InvokeWithTimeout.InfiniteTimeSpan; if (RegistryParameters.GetCopyStatusServerTimeoutEnabled) { invokeTimeout = ReplicaInstanceContainer.CopyStatusServerTimeout; } InvokeWithTimeout.Invoke(delegate() { status = this.ReplicaInstance.GetCopyStatus(flags); }, null, invokeTimeout, true, null); return(status); }
private CopyStatusServerCachedEntry UpdateCachedCopyStatus(RpcDatabaseCopyStatus2 status) { CopyStatusServerCachedEntry copyStatusServerCachedEntry = new CopyStatusServerCachedEntry(status); CopyStatusServerCachedEntry cachedStatus; lock (this.m_statusCacheLocker) { if (CopyStatusHelper.CheckCopyStatusNewer(copyStatusServerCachedEntry, this.m_cachedStatus)) { this.m_cachedStatus = copyStatusServerCachedEntry; } cachedStatus = this.m_cachedStatus; } return(cachedStatus); }
protected override DatabaseValidationCheck.Result ValidateInternal(DatabaseValidationCheck.Arguments args, ref LocalizedString error) { RpcDatabaseCopyStatus2 copyStatus = args.Status.CopyStatus; long num = Math.Max(0L, copyStatus.LastLogCopied - copyStatus.LastLogInspected); if (num > (long)RegistryParameters.DatabaseCheckInspectorQueueLengthFailedThreshold) { error = ReplayStrings.DbValidationInspectorQueueLengthTooHigh(args.DatabaseCopyName, num, (long)RegistryParameters.DatabaseCheckInspectorQueueLengthFailedThreshold); return(DatabaseValidationCheck.Result.Failed); } if (num > (long)RegistryParameters.DatabaseCheckInspectorQueueLengthWarningThreshold) { error = ReplayStrings.DbValidationInspectorQueueLengthTooHigh(args.DatabaseCopyName, num, (long)RegistryParameters.DatabaseCheckInspectorQueueLengthWarningThreshold); return(DatabaseValidationCheck.Result.Warning); } return(DatabaseValidationCheck.Result.Passed); }
internal void CheckForCatalogState(SearchTestResult result) { Guid databaseGuid = result.DatabaseGuid; Guid serverGuid = result.ServerGuid; Guid mailboxGuid = result.MailboxGuid; AmServerName amServer = new AmServerName(result.Server); this.monitor.AddMonitoringEvent(result, Strings.TestSearchGetMDBCatalogState(result.Database)); base.WriteVerbose(Strings.TestSearchGetMDBCatalogState(result.Database)); Exception ex; CopyStatusClientCachedEntry[] copyStatus = CopyStatusHelper.GetCopyStatus(amServer, RpcGetDatabaseCopyStatusFlags2.None, new Guid[] { databaseGuid }, 5000, null, out ex); if (ex != null || copyStatus == null || copyStatus.Length != 1) { this.monitor.AddMonitoringEvent(result, Strings.TestSearchGetCatalogStatusError(result.Database)); return; } RpcDatabaseCopyStatus2 copyStatus2 = copyStatus[0].CopyStatus; base.WriteVerbose(Strings.TestSearchCatalogState(copyStatus2.ContentIndexStatus.ToString())); this.monitor.AddMonitoringEvent(result, Strings.TestSearchCatalogState(copyStatus2.ContentIndexStatus.ToString())); if (copyStatus2.ContentIndexStatus != ContentIndexStatusType.Healthy && copyStatus2.ContentIndexStatus != ContentIndexStatusType.HealthyAndUpgrading) { result.SetErrorTestResult(EventId.CatalogInUnhealthyState, Strings.TestSearchCatalogState(copyStatus2.ContentIndexStatus.ToString())); if (!string.IsNullOrWhiteSpace(copyStatus2.ContentIndexErrorMessage)) { this.monitor.AddMonitoringEvent(result, Strings.TestSearchCatalogErrorMessage(copyStatus2.ContentIndexErrorMessage)); return; } } else if (copyStatus2.ContentIndexBacklog != null) { int value = copyStatus2.ContentIndexBacklog.Value; string backlog = (value / 60).ToString(); this.monitor.AddMonitoringEvent(result, Strings.TestSearchCatalogBacklog(backlog, copyStatus2.ContentIndexRetryQueueSize.ToString())); if (value > this.IndexingTimeoutInSeconds) { result.SetErrorTestResult(EventId.CatalogBacklog, Strings.TestSearchCatalogBacklog(backlog, copyStatus2.ContentIndexRetryQueueSize.ToString())); } } }
// Token: 0x06001955 RID: 6485 RVA: 0x00068D58 File Offset: 0x00066F58 private bool DoesMountPointNeedToBeFixed(IEnumerable <CopyStatusClientCachedEntry> targetDbSet, out MountedFolderPath volumeName) { volumeName = MountedFolderPath.Empty; RpcDatabaseCopyStatus2 copyStatus = base.Context.TargetCopyStatus.CopyStatus; if (FailedSuspendedCopyAutoReseedWorkflow.DoesCopyHaveMountPointConfigured(copyStatus)) { return(false); } CopyStatusClientCachedEntry copyStatusClientCachedEntry = targetDbSet.FirstOrDefault((CopyStatusClientCachedEntry status) => status.Result == CopyStatusRpcResult.Success && FailedSuspendedCopyAutoReseedWorkflow.DoesCopyHaveMountPointConfigured(status.CopyStatus)); if (copyStatusClientCachedEntry == null) { base.TraceError("Database copy is missing a mount point, but no other copies in the grouping have mount points either.", new object[0]); return(false); } volumeName = new MountedFolderPath(copyStatusClientCachedEntry.CopyStatus.DatabaseVolumeName); return(true); }
private static void UpdateDumpsterRequests(DatabaseCopyStatusEntry entry, RpcDatabaseCopyStatus2 copyStatus) { List <DumpsterRequestEntry> list = new List <DumpsterRequestEntry>(); if (copyStatus.DumpsterRequired && !string.IsNullOrEmpty(copyStatus.DumpsterServers)) { string[] array = copyStatus.DumpsterServers.Split(new char[] { ',' }); if (array != null && array.Length > 0) { foreach (string server in array) { list.Add(new DumpsterRequestEntry(server, copyStatus.DumpsterStartTime, copyStatus.DumpsterEndTime)); } } } entry.m_outstandingDumpsterRequests = new DumpsterRequestEntry[list.Count]; list.CopyTo(entry.m_outstandingDumpsterRequests); }
// Token: 0x0600068C RID: 1676 RVA: 0x0001FD2C File Offset: 0x0001DF2C private bool IsPassiveCopy(ref LocalizedString error) { RpcDatabaseCopyStatus2 copyStatus = this.CopyStatus; bool flag = AmServerName.IsEqual(this.SourceServer, this.TargetServer); if (!flag && copyStatus != null && (copyStatus.CopyStatus == CopyStatusEnum.Mounted || copyStatus.CopyStatus == CopyStatusEnum.Mounting || copyStatus.CopyStatus == CopyStatusEnum.Dismounted || copyStatus.CopyStatus == CopyStatusEnum.Dismounting)) { AmTrace.Error("IsPassiveCopy: Copy status for DB '{0}' has active copy status, but fActive is false! CopyStatus = '{1}'. Changing fActive to 'true'.", new object[] { this.DbName, copyStatus.CopyStatus }); flag = true; } if (flag) { error = ReplayStrings.AmBcsDatabaseCopyHostedOnTarget(this.DbName, this.TargetServer.NetbiosName); this.ReportCopyStatusFailure(AmBcsChecks.IsPassiveCopy, error); } return(!flag); }
// Token: 0x06000693 RID: 1683 RVA: 0x0001FFC4 File Offset: 0x0001E1C4 private bool IsCatalogStatusCrawling(ref LocalizedString error) { RpcDatabaseCopyStatus2 copyStatus = this.CopyStatus; AmServerName targetServer = this.TargetServer; LocalizedString localizedString = LocalizedString.Empty; bool flag = this.IsCatalogStatusHealthy(ref localizedString); if (!flag) { flag = (copyStatus.ContentIndexStatus == ContentIndexStatusType.Crawling); if (!flag) { localizedString = ReplayStrings.AmBcsDatabaseCopyCatalogUnhealthy(this.DbName, targetServer.NetbiosName, copyStatus.ContentIndexStatus.ToString()); } } if (!flag) { error = localizedString; this.ReportCopyStatusFailure(AmBcsChecks.IsCatalogStatusCrawling, error); } return(flag); }
// Token: 0x06001357 RID: 4951 RVA: 0x0004E66C File Offset: 0x0004C86C internal static string GetCopyStatusMonitoringDisplayString(RpcDatabaseCopyStatus2 status) { if (status == null) { return(string.Empty); } StringBuilder stringBuilder = new StringBuilder(1323); stringBuilder.AppendFormat("WorkerProcessId : {0}{1}", status.WorkerProcessId, Environment.NewLine); stringBuilder.AppendFormat("ActivationPreference : {0}{1}", status.ActivationPreference, Environment.NewLine); stringBuilder.AppendFormat("CopyStatus : {0}{1}", status.CopyStatus, Environment.NewLine); stringBuilder.AppendFormat("Viable : {0}{1}", status.Viable, Environment.NewLine); stringBuilder.AppendFormat("ActivationSuspended : {0}{1}", status.ActivationSuspended, Environment.NewLine); stringBuilder.AppendFormat("ErrorEventId : {0}{1}", status.ErrorEventId, Environment.NewLine); stringBuilder.AppendFormat("LastStatusTransitionTime : {0}{1}", status.LastStatusTransitionTime, Environment.NewLine); stringBuilder.AppendFormat("StatusRetrievedTime : {0}{1}", status.StatusRetrievedTime, Environment.NewLine); stringBuilder.AppendFormat("InstanceStartTime : {0}{1}", status.InstanceStartTime, Environment.NewLine); stringBuilder.AppendFormat("LowestLogPresent : {0}{1}", status.LowestLogPresent, Environment.NewLine); stringBuilder.AppendFormat("LastLogInspected : {0}{1}", status.LastLogInspected, Environment.NewLine); stringBuilder.AppendFormat("LastLogReplayed : {0}{1}", status.LastLogReplayed, Environment.NewLine); stringBuilder.AppendFormat("LastLogCopied : {0}{1}", status.LastLogCopied, Environment.NewLine); stringBuilder.AppendFormat("LastLogCopyNotified : {0}{1}", status.LastLogCopyNotified, Environment.NewLine); stringBuilder.AppendFormat("LastLogGenerated : {0}{1}", status.LastLogGenerated, Environment.NewLine); stringBuilder.AppendFormat("LastLogGeneratedTime : {0}{1}", status.LastLogGeneratedTime, Environment.NewLine); stringBuilder.AppendFormat("LastCopyNotifiedLogTime : {0}{1}", status.LastCopyNotifiedLogTime, Environment.NewLine); stringBuilder.AppendFormat("LastInspectedLogTime : {0}{1}", status.LastInspectedLogTime, Environment.NewLine); stringBuilder.AppendFormat("LastReplayedLogTime : {0}{1}", status.LastReplayedLogTime, Environment.NewLine); stringBuilder.AppendFormat("LastCopiedLogTime : {0}{1}", status.LastCopiedLogTime, Environment.NewLine); stringBuilder.AppendFormat("LastLogInfoFromClusterGen : {0}{1}", status.LastLogInfoFromClusterGen, Environment.NewLine); stringBuilder.AppendFormat("LastLogInfoFromClusterTime : {0}{1}", status.LastLogInfoFromClusterTime, Environment.NewLine); stringBuilder.AppendFormat("LastLogInfoFromCopierTime : {0}{1}", status.LastLogInfoFromCopierTime, Environment.NewLine); stringBuilder.AppendFormat("LastLogInfoIsStale : {0}{1}", status.LastLogInfoIsStale, Environment.NewLine); stringBuilder.AppendFormat("ReplayLagEnabled : {0}{1}", status.ReplayLagEnabled, Environment.NewLine); stringBuilder.AppendFormat("ReplayLagPlayDownReason : {0}{1}", status.ReplayLagPlayDownReason, Environment.NewLine); stringBuilder.AppendFormat("ReplayLagPercentage : {0}", status.ReplayLagPercentage); return(stringBuilder.ToString()); }