Exemple #1
0
 public GranularWriter(LogCopier logCopier, IPerfmonCounters perfmonCounters, IReplayConfiguration replayConfiguration, ISetBroken setBroken)
 {
     this.m_logCopier       = logCopier;
     this.m_setBroken       = setBroken;
     this.m_perfmonCounters = perfmonCounters;
     this.m_config          = replayConfiguration;
     this.m_perfmonCounters.GranularReplication = 0L;
 }
Exemple #2
0
 public PassiveBlockMode(LogCopier copier, ISetBroken setBroken, int maxConsumerDepthInBytes)
 {
     this.Copier                    = copier;
     this.Configuration             = copier.Configuration;
     this.m_maxConsumerDepthInBytes = maxConsumerDepthInBytes;
     this.m_maxBuffersInUse         = PassiveBlockMode.GetMaxBuffersPerDatabase(this.m_maxConsumerDepthInBytes);
     this.m_consumer                = new GranularWriter(copier, copier.PerfmonCounters, copier.Configuration, setBroken);
     this.m_timer                   = new Timer(new TimerCallback(this.WakeUpCallback));
 }
Exemple #3
0
        public LogCopier FindLogCopier(string nodeName, Guid dbGuid)
        {
            ReplicaInstanceManager replicaInstanceManager = Dependencies.ReplayCoreManager.ReplicaInstanceManager;
            ReplicaInstance        replicaInstance        = null;
            LogCopier logCopier = null;

            if (replicaInstanceManager.TryGetReplicaInstance(dbGuid, out replicaInstance))
            {
                logCopier = replicaInstance.GetComponent <LogCopier>();
                if (logCopier == null)
                {
                    ComponentFinder.Tracer.TraceError <Guid>(0L, "FindLogCopier failed to find LogCopier for database {0}", dbGuid);
                }
            }
            else
            {
                ComponentFinder.Tracer.TraceError <Guid>(0L, "FindLogCopier failed to find RI database {0}", dbGuid);
            }
            return(logCopier);
        }
Exemple #4
0
        public void SetCopyProperty(Guid dbGuid, string propName, string propVal)
        {
            char[] separator = new char[]
            {
                '.'
            };
            string[] array = propName.Split(separator, 2);
            if (array.Length > 1)
            {
                if (SharedHelper.StringIEquals(array[0], "MonitoredDatabase"))
                {
                    MonitoredDatabase.SetCopyProperty(dbGuid, array[1], propVal);
                    return;
                }
                if (SharedHelper.StringIEquals(array[0], "LogCopier"))
                {
                    LogCopier.SetCopyProperty(dbGuid, array[1], propVal);
                    return;
                }
            }
            string message = string.Format("SetCopyProperty doesn't recognize '{0}'", propName);

            throw new ArgumentException(message);
        }
Exemple #5
0
 public void IgnoreGranularCompletions(Guid dbGuid)
 {
     LogCopier.TestIgnoreGranularCompletions(dbGuid);
 }
Exemple #6
0
 public void ConnectCopier(Guid dbGuid)
 {
     LogCopier.TestConnectCopier(dbGuid);
 }
Exemple #7
0
 public void DisconnectCopier(Guid dbGuid)
 {
     LogCopier.TestDisconnectCopier(dbGuid);
 }
Exemple #8
0
 // Token: 0x060022A1 RID: 8865 RVA: 0x000A150F File Offset: 0x0009F70F
 public void Execute()
 {
     LogCopier.EnterBlockMode(this, base.Channel);
 }
        // 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());
        }