Beispiel #1
0
        // Token: 0x06001D55 RID: 7509 RVA: 0x00084890 File Offset: 0x00082A90
        private void VerifyLog(long logfileNumber, string logfileInspect, bool fRecopyOnFailure)
        {
            LocalizedString value;

            if (!LogInspector.VerifyLogStatic(logfileNumber, this.m_logSource, logfileInspect, fRecopyOnFailure, this.m_fileState, this.m_logVerifier, this.m_logContinuityChecker, new LogInspector.CheckStopDelegate(this.CheckStopPending), out value))
            {
                ExTraceGlobals.LogInspectorTracer.TraceError <string>((long)this.GetHashCode(), "LogInspector has failed on {0} too many times, giving up...", logfileInspect);
                throw new LogInspectorFailedException(value);
            }
        }
Beispiel #2
0
        // Token: 0x06001D4B RID: 7499 RVA: 0x000843F4 File Offset: 0x000825F4
        internal static bool VerifyLogStatic(long logfileNumber, LogSource logSource, string logfileInspect, bool fRecopyOnFailure, FileState filestate, LogVerifier logVerifier, LogContinuityChecker continuityChecker, LogInspector.CheckStopDelegate checkStopPending, out LocalizedString error)
        {
            ulong num   = fRecopyOnFailure ? 3UL : 1UL;
            bool  flag  = false;
            bool  flag2 = false;

            error = LocalizedString.Empty;
            for (ulong num2 = 0UL; num2 < num; num2 += 1UL)
            {
                bool flag3 = false;
                if (flag2 && fRecopyOnFailure)
                {
                    LogInspector.RecopyCorruptLog(logfileNumber, logSource, logfileInspect);
                    flag3 = true;
                }
                checkStopPending();
                EsentErrorException ex = logVerifier.Verify(logfileInspect);
                if (ex != null)
                {
                    ExTraceGlobals.LogInspectorTracer.TraceError <string, EsentErrorException>(0L, "Inspection of logfile {0} failed: {1}", logfileInspect, ex);
                    error = new LocalizedString(ex.Message);
                    if (!(ex is EsentFileAccessDeniedException))
                    {
                        flag2 = true;
                        LogInspector.ReportCorruptLog(logfileInspect, error);
                    }
                }
                else
                {
                    flag2 = false;
                    checkStopPending();
                    flag = LogInspector.CheckLogHeader(logfileNumber, logfileInspect, filestate, continuityChecker, out error);
                    if (!flag)
                    {
                        LogInspector.ReportCorruptLog(logfileInspect, error);
                    }
                    else
                    {
                        if (flag3)
                        {
                            ReplayEventLogConstants.Tuple_InspectorFixedCorruptLog.LogEvent(logfileInspect, new object[]
                            {
                                logfileInspect
                            });
                            break;
                        }
                        break;
                    }
                }
            }
            return(flag);
        }
Beispiel #3
0
        // Token: 0x06001D49 RID: 7497 RVA: 0x00084374 File Offset: 0x00082574
        internal static bool VerifyLogTask(long logfileNumber, string logfileInspect, FileState fileState, LogVerifier logVerifier, LogContinuityChecker continuityChecker, out LocalizedString error)
        {
            error = LocalizedString.Empty;
            if (logVerifier == null)
            {
                throw new ArgumentNullException("logVerifier");
            }
            EsentErrorException ex = logVerifier.Verify(logfileInspect);

            if (ex != null)
            {
                error = new LocalizedString(ex.Message);
                return(false);
            }
            return(LogInspector.CheckLogHeaderInternal(logfileNumber, logfileInspect, fileState, continuityChecker, out error));
        }
Beispiel #4
0
        // Token: 0x06001D48 RID: 7496 RVA: 0x0008430C File Offset: 0x0008250C
        internal static bool CheckLogHeader(long logfileNumber, string logfileInspect, FileState fileState, LogContinuityChecker continuityChecker, out LocalizedString error)
        {
            error = LocalizedString.Empty;
            bool result;

            try
            {
                result = LogInspector.CheckLogHeaderInternal(logfileNumber, logfileInspect, fileState, continuityChecker, out error);
            }
            catch (EsentErrorException ex)
            {
                ReplayEventLogConstants.Tuple_IsamException.LogEvent(logfileInspect, new object[]
                {
                    "unknown",
                    ex.Message,
                    logfileInspect
                });
                result = false;
            }
            return(result);
        }
        // Token: 0x06001BB3 RID: 7091 RVA: 0x00076184 File Offset: 0x00074384
        private void MakeAttempt(LogCopier logCopier, LogInspector logInspector, LogReplayer logReplayer)
        {
            bool      flag = false;
            Exception ex   = null;

            try
            {
                this.m_logCopier    = logCopier;
                this.m_logInspector = logInspector;
                this.m_logReplayer  = logReplayer;
                this.ResetMountAllowed();
                this.RecordStartingFileState();
                ExTraceGlobals.FaultInjectionTracer.TraceTest(3227921725U);
                this.AttemptCopyLastLogsInternal();
                flag = true;
            }
            catch (ClusterException ex2)
            {
                ex = ex2;
            }
            catch (TransientException ex3)
            {
                ex = ex3;
            }
            catch (AmServerException ex4)
            {
                ex = ex4;
            }
            catch (EsentErrorException ex5)
            {
                ex = ex5;
            }
            catch (DumpsterRedeliveryException ex6)
            {
                ex = ex6;
            }
            catch (SerializationException ex7)
            {
                ex = ex7;
            }
            finally
            {
                if (ex != null)
                {
                    this.m_setBrokenForOther.SetBroken(FailureTag.NoOp, ReplayEventLogConstants.Tuple_AttemptCopyLastLogsFailed, ex, new string[]
                    {
                        ex.ToString()
                    });
                    ReplayCrimsonEvents.AttemptCopyLastLogsFailed.Log <string, string>(this.m_configuration.DisplayName, ex.ToString());
                    this.m_errorMessage = this.m_setBrokenForOther.ErrorMessage;
                }
                this.RecordEndingFileState();
                if (!flag)
                {
                    this.ResetMountAllowed();
                }
                this.StopCopierAndInspector();
            }
            if (ex == null && !this.ErrorMessage.IsEmpty)
            {
                this.m_setBrokenForOther.SetBroken(FailureTag.NoOp, ReplayEventLogConstants.Tuple_AttemptCopyLastLogsFailed, new string[]
                {
                    this.ErrorMessage
                });
                ReplayCrimsonEvents.AttemptCopyLastLogsFailed.Log <string, LocalizedString>(this.m_configuration.DisplayName, this.ErrorMessage);
                this.m_errorMessage = this.m_setBrokenForOther.ErrorMessage;
            }
        }
        // Token: 0x06001BB1 RID: 7089 RVA: 0x00076118 File Offset: 0x00074318
        public static AmAcllReturnStatus AttemptCopyLastLogsOnceRcr(IPerfmonCounters perfmonCounters, ReplayConfiguration configuration, FileChecker fileChecker, ISetGeneration setGeneration, ISetViable setViable, LogCopier logCopier, LogInspector logInspector, LogReplayer logReplayer, bool performDivergenceCheck, bool fSkipHealthChecks, DatabaseMountDialOverride mountDialOverride, AcllPerformanceTracker acllPerf, string uniqueOperationId, int subactionAttemptNumber, bool mountPending)
        {
            AttemptCopyLastLogs attemptCopyLastLogs = new AttemptCopyLastLogs(perfmonCounters, configuration, fileChecker, performDivergenceCheck, setGeneration, setViable, fSkipHealthChecks, mountDialOverride, acllPerf, uniqueOperationId, subactionAttemptNumber);

            attemptCopyLastLogs.MakeAttempt(logCopier, logInspector, logReplayer);
            return(attemptCopyLastLogs.GetReturnStatus());
        }