예제 #1
0
 // Token: 0x06001D3F RID: 7487 RVA: 0x00083F63 File Offset: 0x00082163
 public void SetLogShipACLLTimeoutMs()
 {
     this.m_logSource.SetTimeoutInMsec(LogSource.GetLogShipTimeoutInMsec(true));
 }
예제 #2
0
 // Token: 0x06001D51 RID: 7505 RVA: 0x00084562 File Offset: 0x00082762
 private static void RecopyCorruptLog(long logfileNumber, LogSource logSource, string logfileInspect)
 {
     ExTraceGlobals.LogInspectorTracer.TraceError <string>(0L, "Initiating re-copy of corrupt logfile {0}", logfileInspect);
     logSource.CopyLog(logfileNumber, logfileInspect);
 }
예제 #3
0
 // Token: 0x06001D3E RID: 7486 RVA: 0x00083E24 File Offset: 0x00082024
 public LogInspector(IPerfmonCounters perfmonCounters, IReplayConfiguration replayConfig, string logfileBaseName, string logfileSuffix, string replayDir, FileState fileState, ILogTruncater logTruncater, ISetBroken setBroken, ISetGeneration setGeneration, IReplicaProgress replicaProgress, NetworkPath netPath, bool runningAcll) : base(replayConfig.LogInspectorPath, logfileBaseName, 0L, logfileSuffix, setBroken, replicaProgress)
 {
     this.Config          = replayConfig;
     this.m_logTruncater  = logTruncater;
     this.m_replayDir     = replayDir;
     this.m_fileState     = fileState;
     this.m_setGeneration = setGeneration;
     this.m_logVerifier   = new LogVerifier(logfileBaseName);
     ExTraceGlobals.LogInspectorTracer.TraceDebug((long)this.GetHashCode(), "LogInspector initialized - inspectDir = {0}, logfileBaseName = {1}, replayDir = {2}, fileState = {3}", new object[]
     {
         replayConfig.LogInspectorPath,
         logfileBaseName,
         replayDir,
         fileState
     });
     ExTraceGlobals.PFDTracer.TracePfd((long)this.GetHashCode(), "LogInspector initialized - inspectDir = {0}, logfileBaseName = {1}, replayDir = {2}, fileState = {3}", new object[]
     {
         replayConfig.LogInspectorPath,
         logfileBaseName,
         replayDir,
         fileState
     });
     this.Config.ReplayState.InspectorGenerationNumber = this.m_fileState.HighestGenerationPresent;
     this.m_logSource = LogSource.Construct(replayConfig, perfmonCounters, netPath, LogSource.GetLogShipTimeoutInMsec(runningAcll));
     if (0L != this.m_fileState.HighestGenerationPresent)
     {
         this.m_logContinuityChecker.Initialize(this.m_fileState.HighestGenerationPresent, this.Config.DestinationLogPath, this.Config.LogFilePrefix, logfileSuffix);
     }
 }
예제 #4
0
        // Token: 0x06001D69 RID: 7529 RVA: 0x000850F4 File Offset: 0x000832F4
        public void CheckForDivergence(FileState fileState)
        {
            this.m_logSource = LogSource.Construct(this.Config, null, null, LogSource.GetLogShipTimeoutInMsec(false));
            if (0L == fileState.HighestGenerationPresent || fileState.HighestGenerationPresent < fileState.HighestGenerationRequired)
            {
                LogRepair.Tracer.TraceError <string, long>((long)this.GetHashCode(), "CheckForDivergence({0}): failed with HighestGenerationPresent 0x{1:X}", this.Config.DisplayName, fileState.HighestGenerationPresent);
                throw new LogRepairNotPossibleException(ReplayStrings.LogRepairNotPossibleInsuffientToCheckDivergence);
            }
            long   num  = fileState.HighestGenerationPresent;
            string text = Path.Combine(this.Config.DestinationLogPath, this.Config.LogFilePrefix) + "." + this.Config.LogExtension;
            bool   flag = false;
            string text2;

            if (File.Exists(text))
            {
                flag  = true;
                num  += 1L;
                text2 = text;
            }
            else
            {
                text2 = this.Config.BuildFullLogfileName(num);
            }
            long      num2 = -1L;
            Exception ex   = null;

            try
            {
                num2 = this.m_logSource.QueryEndOfLog();
            }
            catch (NetworkRemoteException ex2)
            {
                ex = ex2;
            }
            catch (NetworkTransportException ex3)
            {
                ex = ex3;
            }
            if (ex != null)
            {
                throw new LogRepairTransientException(ex.Message, ex);
            }
            if (num2 < num)
            {
                LogRepair.Tracer.TraceError <string, long>((long)this.GetHashCode(), "CheckForDivergence({0}): failed with HighestGenerationPresent 0x{1:X}", this.Config.DisplayName, fileState.HighestGenerationPresent);
                throw new LogRepairNotPossibleException(ReplayStrings.LogRepairNotPossibleActiveIsDivergent(this.Config.SourceMachine));
            }
            ex = this.VerifyLog(text2, num);
            if (ex != null)
            {
                throw new LogRepairNotPossibleException(ReplayStrings.LogRepairDivergenceCheckFailedDueToCorruptEndOfLog(text2, ex.Message), ex);
            }
            string path  = this.Config.BuildShortLogfileName(num);
            string text3 = Path.Combine(this.m_workingPath, path);

            this.CopyAndVerifyFromActive(num, text3);
            try
            {
                if (flag)
                {
                    if (!EseHelper.IsLogfileSubset(text3, text, this.m_workingPath, null, null))
                    {
                        LogRepair.Tracer.TraceError <string, long>((long)this.GetHashCode(), "CheckForDivergence({0}): failed with e00 divergence at gen 0x{1}.", this.Config.DisplayName, num);
                        throw new LogRepairNotPossibleException(ReplayStrings.LogRepairNotPossibleActiveIsDivergent(this.Config.SourceMachine));
                    }
                    long num3 = num - 1L;
                    if (num3 <= 1L)
                    {
                        throw new LogRepairNotPossibleException(ReplayStrings.LogRepairNotPossibleInsuffientToCheckDivergence);
                    }
                    string text4 = this.Config.BuildFullLogfileName(num3);
                    this.VerifyLog(text4, num3);
                    if (ex != null)
                    {
                        throw new LogRepairNotPossibleException(ReplayStrings.LogRepairDivergenceCheckFailedDueToCorruptEndOfLog(text4, ex.Message), ex);
                    }
                    string text5 = this.Config.BuildShortLogfileName(num3);
                    string text6 = Path.Combine(this.m_workingPath, text5);
                    this.CopyAndVerifyFromActive(num3, text6);
                    Exception ex4;
                    if (!this.IsFileBinaryEqual(text6, text4, out ex4))
                    {
                        if (ex4 != null)
                        {
                            throw new LogRepairDivergenceCheckFailedException(text5, text6, ex4.Message, ex4);
                        }
                        throw new LogRepairNotPossibleException(ReplayStrings.LogRepairNotPossibleActiveIsDivergent(this.Config.SourceMachine));
                    }
                }
                else if (!EseHelper.IsLogfileEqual(text3, text2, this.m_workingPath, null, null))
                {
                    LogRepair.Tracer.TraceError <string, long>((long)this.GetHashCode(), "CheckForDivergence({0}): failed with divergence at gen 0x{1}.", this.Config.DisplayName, num);
                    throw new LogRepairNotPossibleException(ReplayStrings.LogRepairNotPossibleActiveIsDivergent(this.Config.SourceMachine));
                }
            }
            catch (EsentErrorException ex5)
            {
                throw new LogRepairDivergenceCheckFailedException(text2, text3, ex5.Message, ex5);
            }
        }