// Token: 0x060011BE RID: 4542 RVA: 0x00049874 File Offset: 0x00047A74
        public Exception PersistHealthInfoToXml()
        {
            DbCopyHealthInfoInternalTable dbCopyHealthInfoInternalTable = null;

            lock (this.m_locker)
            {
                dbCopyHealthInfoInternalTable = this.m_healthTable;
            }
            return(dbCopyHealthInfoInternalTable.PersistHealthInfoToXml());
        }
        // Token: 0x060011B3 RID: 4531 RVA: 0x00049228 File Offset: 0x00047428
        public bool UpdateHealthInfo(HealthInfoPersisted healthInfo, bool isPrimary)
        {
            DbCopyHealthInfoTable.Tracer.TraceDebug <bool>((long)this.GetHashCode(), "UpdateHealthInfo() called with isPrimary = '{0}'", isPrimary);
            DateTime lastUpdateTimeUtc = healthInfo.GetLastUpdateTimeUtc();
            DbCopyHealthInfoInternalTable dbCopyHealthInfoInternalTable = null;

            lock (this.m_locker)
            {
                if (this.m_fInitialized)
                {
                    DateTimeHelper.SafeSubtract(lastUpdateTimeUtc, this.m_healthTable.LastUpdateTimeUtc);
                    if (this.m_healthTable.LastUpdateTimeUtc > lastUpdateTimeUtc)
                    {
                        string text  = DateTimeHelper.ToStringInvariantCulture(lastUpdateTimeUtc);
                        string text2 = DateTimeHelper.ToStringInvariantCulture(this.m_healthTable.LastUpdateTimeUtc);
                        if (isPrimary)
                        {
                            DbCopyHealthInfoTable.Tracer.TraceError <string, string>((long)this.GetHashCode(), "UpdateHealthInfo(): Primary node is ignoring older table with update time '{0}'. Local update time: {1}", text, text2);
                            ReplayCrimsonEvents.DHTPrimaryStartupIgnoringOlderTable.LogPeriodic <string, string>(text, DateTimeHelper.OneHour, text, text2);
                            return(false);
                        }
                        DbCopyHealthInfoTable.Tracer.TraceError <TimeSpan>((long)this.GetHashCode(), "UpdateHealthInfo(): The health table is being replaced with an older one. Age difference: {0}", this.m_healthTable.LastUpdateTimeUtc.Subtract(lastUpdateTimeUtc));
                        ReplayCrimsonEvents.DHTSecondaryOlderTable.LogPeriodic <string, string>(text, DateTimeHelper.OneHour, text, text2);
                    }
                }
                DbCopyHealthInfoTable.Tracer.TraceDebug <DateTime>((long)this.GetHashCode(), "UpdateHealthInfo(): The health table is being updated/replaced with a table of update timestamp: {0}", lastUpdateTimeUtc);
                this.m_fInitialized = false;
                this.m_healthTable  = new DbCopyHealthInfoInternalTable(this.m_fileFullPath);
                this.m_healthTable.InitializeFromHealthInfoPersisted(healthInfo);
                this.m_fInitialized           = true;
                dbCopyHealthInfoInternalTable = this.m_healthTable;
            }
            Exception ex = dbCopyHealthInfoInternalTable.PersistHealthInfoToXml();

            if (ex != null)
            {
                DbCopyHealthInfoTable.Tracer.TraceError <Exception>((long)this.GetHashCode(), "UpdateHealthInfo(): Failed to persist health table to XML file. Error: {0}", ex);
                if (isPrimary)
                {
                    ReplayCrimsonEvents.DHTPrimaryPersistFailed.LogPeriodic <string, Exception>(Environment.MachineName, DateTimeHelper.OneHour, ex.Message, ex);
                }
                else
                {
                    ReplayCrimsonEvents.DHTSecondaryPersistFailed.LogPeriodic <string, Exception>(Environment.MachineName, DateTimeHelper.OneHour, ex.Message, ex);
                }
            }
            return(true);
        }