Пример #1
0
        private void SetDisconnectedInternal(FailureTag failureTag, ExEventLog.EventTuple setDisconnectedEventTuple, params string[] setDisconnectedArgs)
        {
            string[] argumentsWithDb = ReplicaInstanceContext.GetArgumentsWithDb(setDisconnectedArgs, this.m_displayName);
            int      num;
            string   text = setDisconnectedEventTuple.EventLogToString(out num, argumentsWithDb);

            lock (this.m_instance)
            {
                if (!this.FailureInfo.IsFailed)
                {
                    this.LogCrimsonEventOnStateChange <bool>("Disconnected", this.FailureInfo.IsDisconnected, true);
                    this.FailureInfo.SetDisconnected(setDisconnectedEventTuple, new LocalizedString(text));
                    if (this.m_perfmonCounters != null)
                    {
                        this.m_perfmonCounters.Disconnected = 1L;
                    }
                }
                else
                {
                    ExTraceGlobals.ReplicaInstanceTracer.TraceDebug <string>((long)this.GetHashCode(), "{0} SetDisconnected ignored because RI is already marked Failed.", this.m_displayName);
                }
                this.ExternalStatus.Refresh();
            }
            bool flag2;

            setDisconnectedEventTuple.LogEvent(this.m_identity, out flag2, argumentsWithDb);
            ExTraceGlobals.ReplicaInstanceTracer.TraceDebug <string, string>((long)this.GetHashCode(), "{0} SetDisconnected because {1}", this.m_displayName, text);
        }
Пример #2
0
        private void SetSeedingStartedErrorMessage(RpcSeederArgs rpcSeederArgs)
        {
            string[] argumentsWithDb = ReplicaInstanceContext.GetArgumentsWithDb(new string[]
            {
                rpcSeederArgs.ToString()
            }, this.m_displayName);
            ExEventLog.EventTuple tuple_SeedInstanceStartedSetBroken = ReplayEventLogConstants.Tuple_SeedInstanceStartedSetBroken;
            int    num;
            string value = tuple_SeedInstanceStartedSetBroken.EventLogToString(out num, argumentsWithDb);

            this.FailureInfo.SetBroken(tuple_SeedInstanceStartedSetBroken, new LocalizedString(value), null);
            this.FailureInfo.PersistFailure(this.m_replayState);
        }
Пример #3
0
 public void SetBrokenAndThrow(FailureTag failureTag, ExEventLog.EventTuple setBrokenEventTuple, Exception exception, params string[] setBrokenArgs)
 {
     string[] argumentsWithDb = ReplicaInstanceContext.GetArgumentsWithDb(setBrokenArgs, this.m_displayName);
     this.SetBrokenInternal(failureTag, setBrokenEventTuple, new ExtendedErrorInfo(exception), argumentsWithDb);
     throw new SetBrokenControlTransferException();
 }