// Token: 0x06000FD2 RID: 4050 RVA: 0x0005D6C0 File Offset: 0x0005B8C0
        private StoreStatistics GetStoreStatistics(DatabaseInfo databaseInfo, Guid mailboxGuid)
        {
            StoreStatistics result = null;

            TimeBasedAssistant.TrackAdminRpcCalls(databaseInfo, "Client=TBA", delegate(ExRpcAdmin admin)
            {
                PropValue[][] mailboxTableInfo = admin.GetMailboxTableInfo(databaseInfo.Guid, mailboxGuid, SearchIndexRepairAssistant.StorePropTags);
                if (mailboxTableInfo.Length != 1)
                {
                    throw new AssistantException(Strings.IndexRepairUnexpectedRpcResultLength(mailboxTableInfo.Length));
                }
                if (mailboxTableInfo[0].Length != SearchIndexRepairAssistant.StorePropTags.Length)
                {
                    throw new AssistantException(Strings.IndexRepairUnexpectedRpcResultRowLength(mailboxTableInfo[0].Length));
                }
                int @int = mailboxTableInfo[0][0].GetInt();
                int int2 = mailboxTableInfo[0][1].GetInt();
                result   = new StoreStatistics((long)@int, (long)int2);
            });
            return(result);
        }
 // Token: 0x06000FD0 RID: 4048 RVA: 0x0005D460 File Offset: 0x0005B660
 protected override void InvokeInternal(InvokeArgs invokeArgs, List <KeyValuePair <string, object> > customDataToLog)
 {
     try
     {
         lock (this)
         {
             if (this.shuttingDown)
             {
                 throw new ShutdownException();
             }
             this.diagnosticsSession.TraceDebug("SearchIndexRepairAssistant: InvokeInternal", new object[0]);
             ErrorStatistics   errorStatistics   = this.errorStatisticsProvider.GetErrorStatistics(invokeArgs.MailboxData.MailboxGuid);
             StoreStatistics   storeStatistics   = this.GetStoreStatistics(base.DatabaseInfo, invokeArgs.MailboxData.MailboxGuid);
             MailboxStatistics mailboxStatistics = new MailboxStatistics(base.DatabaseInfo.DatabaseName, invokeArgs.MailboxData, errorStatistics, storeStatistics);
             this.indexRepairLogger.LogMailboxStatistics(mailboxStatistics);
         }
     }
     catch (OperationFailedException ex)
     {
         this.diagnosticsSession.LogDiagnosticsInfo(DiagnosticsLoggingTag.Failures, "AssistantFailure", new object[]
         {
             "Failure talking to FAST {0}",
             ex
         });
         throw new TransientDatabaseException(Strings.IndexRepairQueryFailure, ex, new RetrySchedule(FinalAction.RetryForever, TimeSpan.MaxValue, new TimeSpan[]
         {
             this.config.IndexRepairAssistantRetryInterval
         }));
     }
     catch (AssistantException ex2)
     {
         this.diagnosticsSession.LogDiagnosticsInfo(DiagnosticsLoggingTag.Failures, "AssistantFailure", new object[]
         {
             "Failed to execute assistant {0}",
             ex2
         });
         throw new SkipException(ex2);
     }
 }
Example #3
0
        // Token: 0x06000FC2 RID: 4034 RVA: 0x0005D2C0 File Offset: 0x0005B4C0
        public MailboxStatistics(string mdbName, MailboxData mailboxData, ErrorStatistics errorStatistics, StoreStatistics storeStatistics)
        {
            this.DatabaseName    = mdbName;
            this.MailboxGuid     = mailboxData.MailboxGuid;
            this.ErrorStatistics = errorStatistics;
            this.StoreStatistics = storeStatistics;
            MailboxType mailboxType = MailboxType.Unknown;
            StoreMailboxDataExtended storeMailboxDataExtended = mailboxData as StoreMailboxDataExtended;

            if (storeMailboxDataExtended != null)
            {
                mailboxType = MailboxType.Default;
                if (storeMailboxDataExtended.IsPublicFolderMailbox)
                {
                    mailboxType |= MailboxType.PublicFolder;
                }
                if (storeMailboxDataExtended.IsArchiveMailbox)
                {
                    mailboxType |= MailboxType.Archive;
                }
                if (storeMailboxDataExtended.IsGroupMailbox)
                {
                    mailboxType |= MailboxType.ModernGroup;
                }
                if (storeMailboxDataExtended.IsSharedMailbox)
                {
                    mailboxType |= MailboxType.Shared;
                }
                if (storeMailboxDataExtended.IsTeamSiteMailbox)
                {
                    mailboxType |= MailboxType.TeamSite;
                }
            }
            this.Type = mailboxType;
        }