// Token: 0x06001BBF RID: 7103 RVA: 0x0007737C File Offset: 0x0007557C private void UpdateMountAllowedNow(out AutoDatabaseMountDial mountDial, out bool mountDialOverrideUsed) { mountDial = AutoDatabaseMountDial.Lossless; mountDialOverrideUsed = false; if (this.NoLoss) { ExTraceGlobals.ReplicaInstanceTracer.TraceDebug((long)this.GetHashCode(), "MountAllowedNow returns true as NoLoss."); this.MountAllowed = true; return; } bool flag = false; long num = 0L; mountDialOverrideUsed = this.GetLossyMountSettings(ref num, ref flag); this.m_acllPerf.RunTimedOperation(AcllTimedOperation.ProtectUnboundedDataloss, delegate { this.ProtectUnboundedDataloss(); }); if (mountDialOverrideUsed && flag) { ExTraceGlobals.ReplicaInstanceTracer.TraceDebug((long)this.GetHashCode(), "MountDialOverride of BestEffort, allowing Mount now."); } else { mountDial = (AutoDatabaseMountDial)num; flag = (num != 0L && this.NumberOfLogsLost <= num); } if (flag) { this.m_acllPerf.RunTimedOperation(AcllTimedOperation.MarkRedeliveryRequired, delegate { DumpsterRedeliveryWrapper.MarkRedeliveryRequired(this.m_configuration, this.LastLogInspectedTime, this.LastLogShipped, this.NumberOfLogsLost); }); } ExTraceGlobals.ReplicaInstanceTracer.TraceDebug <bool>((long)this.GetHashCode(), "fMountAllowed = {0}", flag); this.MountAllowed = flag; this.MountDialOverrideUsed = mountDialOverrideUsed; }
public virtual bool ConfigEquals(IReplayConfiguration other, out ReplayConfigChangedFlags changedFlags) { changedFlags = ReplayConfigChangedFlags.None; string b = null; string b2 = null; string b3 = null; string b4 = null; string b5 = null; string b6 = null; AutoDatabaseMountDial autoDatabaseMountDial = AutoDatabaseMountDial.Lossless; AutoDatabaseMountDial autoDatabaseMountDial2 = AutoDatabaseMountDial.Lossless; bool flag = false; bool flag2 = false; bool flag3 = true; StringBuilder stringBuilder = new StringBuilder(); ReplayConfigType type; string name; Guid identityGuid; string sourceMachine; string logFilePrefix; string destinationLogPath; string destinationSystemPath; string destinationEdbPath; bool circularLoggingEnabled; EnhancedTimeSpan replayLagTime; EnhancedTimeSpan truncationLagTime; bool databaseCreated; int num; try { type = this.Type; name = this.Name; identityGuid = this.IdentityGuid; sourceMachine = this.SourceMachine; logFilePrefix = this.LogFilePrefix; destinationLogPath = this.DestinationLogPath; destinationSystemPath = this.DestinationSystemPath; destinationEdbPath = this.DestinationEdbPath; circularLoggingEnabled = this.CircularLoggingEnabled; replayLagTime = this.ReplayLagTime; truncationLagTime = this.TruncationLagTime; databaseCreated = this.DatabaseCreated; if (type == ReplayConfigType.RemoteCopySource || type == ReplayConfigType.RemoteCopyTarget) { flag = true; autoDatabaseMountDial = ((RemoteReplayConfiguration)this).AutoDatabaseMountDial; num = ((RemoteReplayConfiguration)this).Database.DatabaseCopies.Length; } else { num = 1; } } catch (TransientException) { ExTraceGlobals.ReplayManagerTracer.TraceDebug((long)this.GetHashCode(), "ReplayConfiguration.ConfigEquals() returning false because a TransientException was encountered."); return(false); } ReplayConfigType type2; Guid identityGuid2; bool circularLoggingEnabled2; EnhancedTimeSpan replayLagTime2; EnhancedTimeSpan truncationLagTime2; bool databaseCreated2; int num2; try { type2 = other.Type; b = other.Name; identityGuid2 = other.IdentityGuid; b6 = other.SourceMachine; b2 = other.LogFilePrefix; b3 = other.DestinationLogPath; b4 = other.DestinationSystemPath; b5 = other.DestinationEdbPath; circularLoggingEnabled2 = other.CircularLoggingEnabled; replayLagTime2 = other.ReplayLagTime; truncationLagTime2 = other.TruncationLagTime; databaseCreated2 = other.DatabaseCreated; if (type2 == ReplayConfigType.RemoteCopySource || type2 == ReplayConfigType.RemoteCopyTarget) { flag2 = true; autoDatabaseMountDial2 = ((RemoteReplayConfiguration)other).AutoDatabaseMountDial; num2 = ((RemoteReplayConfiguration)other).Database.DatabaseCopies.Length; } else { num2 = 1; } } catch (TransientException) { return(true); } if (num != num2) { flag3 = false; stringBuilder.AppendLine("origCopyCount != newCopyCount"); } if (type != type2) { flag3 = false; changedFlags |= ReplayConfigChangedFlags.ActiveServer; stringBuilder.AppendLine("origType != newType"); } if (name != b) { flag3 = false; stringBuilder.AppendLine("origName != newName"); } if (identityGuid != identityGuid2) { flag3 = false; stringBuilder.AppendLine("origIdentityGuid != newIdentityGuid"); } if (sourceMachine != b6) { flag3 = false; changedFlags |= ReplayConfigChangedFlags.ActiveServer; stringBuilder.AppendLine("origSourceMachine != newSourceMachine"); } if (logFilePrefix != b2) { flag3 = false; stringBuilder.AppendLine("origLogFilePrefix != newLogFilePrefix"); } if (destinationLogPath != b3) { flag3 = false; stringBuilder.AppendLine("origDestinationLogPath != newDestinationLogPath"); } if (destinationSystemPath != b4) { flag3 = false; stringBuilder.AppendLine("origDestinationSystemPath != newDestinationSystemPath"); } if (destinationEdbPath != b5) { flag3 = false; stringBuilder.AppendLine("origDestinationEdbPath != newDestinationEdbPath"); } if (circularLoggingEnabled != circularLoggingEnabled2) { flag3 = false; stringBuilder.AppendLine("origCircularLoggingEnabled != newCircularLoggingEnabled"); } if (replayLagTime != replayLagTime2) { flag3 = false; stringBuilder.AppendLine("origReplayLagTime != newReplayLagTime"); } if (truncationLagTime != truncationLagTime2) { flag3 = false; stringBuilder.AppendLine("origTruncationLagTime != newTruncationLagTime"); } if (flag && flag2 && autoDatabaseMountDial != autoDatabaseMountDial2) { flag3 = false; stringBuilder.AppendLine("origMountDial != newMountDial"); } if (databaseCreated != databaseCreated2) { flag3 = false; stringBuilder.AppendLine("origDatabaseCreated != newDatabaseCreated"); } if (!flag3) { changedFlags |= ReplayConfigChangedFlags.Other; ExTraceGlobals.ReplayManagerTracer.TraceDebug((long)this.GetHashCode(), "{0}: ReplayConfiguration.ConfigEquals() returning false because of the following: {1}ChangedFlags:{2}; Reason:{3}", new object[] { this.m_displayName, Environment.NewLine, changedFlags, stringBuilder.ToString() }); } return(flag3); }
// Token: 0x06001BBA RID: 7098 RVA: 0x00076B88 File Offset: 0x00074D88 private void ComputeLossAndMountAllowed(LocalizedString errorString) { AutoDatabaseMountDial autoDatabaseMountDial = AutoDatabaseMountDial.Lossless; bool flag = false; this.m_acllPerf.RunTimedOperation(AcllTimedOperation.SetLossVariables, delegate { this.SetLossVariables(); }); this.UpdateMountAllowedNow(out autoDatabaseMountDial, out flag); if (this.NumberOfLogsLost > 0L) { ReplayCrimsonEvents.AcllReportedLoss.Log <string, Guid, long, long, long, AutoDatabaseMountDial, bool, string, int, DateTime, DateTime>(this.m_configuration.DatabaseName, this.m_configuration.IdentityGuid, this.NumberOfLogsLost, this.LastLogNotified, this.LastLogShipped, autoDatabaseMountDial, flag, this.m_uniqueOperationId, this.m_subactionAttemptNumber, this.LastLogInspectedTime, this.m_state.LatestInspectorTime); this.LogLossyAcll(); } if (this.NoLoss) { ReplayEventLogConstants.Tuple_AutoMountReportNoLoss.LogEvent(this.m_configuration.Identity, new object[] { this.m_configuration.DisplayName, this.m_configuration.TargetMachine }); return; } if (flag && this.MountAllowed) { ReplayEventLogConstants.Tuple_MountAllowedWithMountDialOverride.LogEvent(this.m_configuration.Identity, new object[] { this.m_configuration.DisplayName, this.m_configuration.TargetMachine, this.m_mountDialOverride, this.LastLogNotified, this.LastLogShipped, errorString }); return; } if (flag && !this.MountAllowed) { ReplayEventLogConstants.Tuple_MountNotAllowedWithMountDialOverride.LogEvent(this.m_configuration.Identity, new object[] { this.m_configuration.DisplayName, this.m_configuration.TargetMachine, this.m_mountDialOverride, this.LastLogNotified, this.LastLogShipped, errorString }); return; } if (this.MountAllowed) { ReplayEventLogConstants.Tuple_AutoMountReportMountWithDataLoss.LogEvent(this.m_configuration.Identity, new object[] { this.m_configuration.DisplayName, this.m_configuration.TargetMachine, this.LastLogNotified, this.LastLogShipped, autoDatabaseMountDial, errorString }); return; } ReplayEventLogConstants.Tuple_AutoMountReportMountNotAllowed.LogEvent(this.m_configuration.Identity, new object[] { this.m_configuration.DisplayName, this.m_configuration.TargetMachine, this.LastLogNotified, this.LastLogShipped, autoDatabaseMountDial, errorString }); }