// Token: 0x06001BBB RID: 7099 RVA: 0x00076E40 File Offset: 0x00075040
        private void LogLossyAcll()
        {
            List <string> list        = new List <string>(4);
            string        simpleName  = AmServerName.GetSimpleName(this.m_configuration.SourceMachine);
            string        machineName = Environment.MachineName;

            foreach (IADDatabaseCopy iaddatabaseCopy in this.m_configuration.Database.DatabaseCopies)
            {
                if (!MachineName.Comparer.Equals(iaddatabaseCopy.HostServerName, simpleName) && !MachineName.Comparer.Equals(iaddatabaseCopy.HostServerName, machineName))
                {
                    list.Add(iaddatabaseCopy.HostServerName);
                }
            }
            string text       = string.Join(",", list.ToArray());
            long   generation = this.LastLogShipped;

            if (this.m_logCopier.GranuleUsedAsE00)
            {
                generation = 0L;
            }
            string               text2 = this.m_configuration.BuildFullLogfileName(generation);
            int                  num   = 0;
            Exception            ex;
            EseLogRecordPosition lastLogRecordPosition = EseHelper.GetLastLogRecordPosition(text2, this.m_configuration.E00LogBackupPath, out ex);

            if (lastLogRecordPosition != null)
            {
                num = lastLogRecordPosition.ByteOffsetToStartOfRec + lastLogRecordPosition.LogRecordLength;
            }
            else
            {
                AttemptCopyLastLogs.Tracer.TraceError <string, string>((long)this.GetHashCode(), "Failed to GetLastLogRecordPosition for '{0}': {1}", text2, (ex == null) ? "log appears empty" : ex.ToString());
            }
            ReplayCrimsonEvents.AcllReportedLoss2.Log <string, Guid, long, string, string, string, string, bool, string, string, string>(this.m_configuration.DatabaseName, this.m_configuration.IdentityGuid, this.NumberOfLogsLost, string.Format("0x{0:X}", this.LastLogNotified), string.Format("0x{0:X}", this.LastLogShipped), string.Format("0x{0:X}", num), string.Format("{0} UTC", this.LastLogInspectedTime.ToString("yyyy-MM-dd HH:mm:ss.fff")), this.m_logCopier.GranuleUsedAsE00, this.m_configuration.SourceMachine, text, this.m_uniqueOperationId);
        }
예제 #2
0
        internal static long RequestGlobalTruncationCoordination(long localTruncationPoint, string sourceMachineFqdn, string localNodeName, Guid identityGuid, string logPrefix, string destLogPath, bool circularLogging, ManualOneShotEvent cancelEvent)
        {
            long     num     = -1L;
            TimeSpan timeout = TimeSpan.FromSeconds((double)RegistryParameters.LogTruncationOpenContextTimeoutInSec);

            localNodeName = AmServerName.GetSimpleName(localNodeName);
            using (LogShipContextWrapper logShipContextWrapper = new LogShipContextWrapper(TestSupport.UseLocalMachineNameOnZerobox(sourceMachineFqdn), localNodeName, identityGuid, logPrefix, destLogPath, circularLogging, timeout, cancelEvent))
            {
                LogTruncater.Tracer.TraceDebug <Guid, string, long>(0L, "RequestGlobalTruncationCoordination for db {0}: Calling Notify() to source server {1}, with local truncation point of {2}.", identityGuid, sourceMachineFqdn, localTruncationPoint);
                logShipContextWrapper.Notify(localTruncationPoint, ref num);
                LogTruncater.Tracer.TraceDebug <Guid, long, long>(0L, "RequestGlobalTruncationCoordination for db {0} notified our lowest is 0x{1:X}, learned the global truncation is 0x{2:X}", identityGuid, localTruncationPoint, num);
            }
            return(num);
        }