コード例 #1
0
 // Token: 0x060001B0 RID: 432 RVA: 0x0000AB10 File Offset: 0x00008D10
 internal void AttemptCopyLastLogsDirect(Guid mdbGuid, AmAcllArgs acllArgs, ref AmAcllReturnStatus acllStatus)
 {
     acllStatus = new AmAcllReturnStatus();
     ThirdPartyManager.PreventOperationWhenTPREnabled("AttemptCopyLastLogsDirect");
     if (!AmHelper.IsDatabaseRcrEnabled(mdbGuid))
     {
         throw new AmDbMoveOperationNotSupportedException(mdbGuid.ToString());
     }
     AmTrace.Debug("AttemptCopyLastLogsDirect: Calling AmAcllCallback ({0})", new object[]
     {
         mdbGuid
     });
     acllStatus = this.m_replicaInstanceManager.AmAttemptCopyLastLogsCallback(mdbGuid, acllArgs);
     if (acllArgs.ActionCode.IsAutomaticShutdownSwitchover)
     {
         if (!acllStatus.NoLoss)
         {
             ReplayCrimsonEvents.AcllFailedOnSwitchover.Log <Guid>(mdbGuid);
             throw new AcllFailedException(acllStatus.LastError);
         }
         ReplayCrimsonEvents.AcllLosslessOnSwitchover.Log <Guid>(mdbGuid);
         return;
     }
     else
     {
         if (!acllStatus.NoLoss && acllStatus.MountAllowed)
         {
             ReplayCrimsonEvents.LossyMountEnabled.Log <Guid>(mdbGuid);
             AmTrace.Warning("AttemptCopyLastLogsDirect: ACLL detected a lossy mount will be allowed for DB {0}.", new object[]
             {
                 mdbGuid
             });
             return;
         }
         if (acllStatus.MountAllowed)
         {
             AmTrace.Debug("AttemptCopyLastLogsDirect: ACLL completed with no loss for DB {0}.", new object[]
             {
                 mdbGuid
             });
             ReplayCrimsonEvents.AcllLosslessOnMoveOrFailover.Log <Guid>(mdbGuid);
             return;
         }
         if (string.IsNullOrEmpty(acllStatus.LastError))
         {
             ReplayCrimsonEvents.MountRejected.Log <Guid>(mdbGuid);
             throw new AmDbMountNotAllowedDueToLossException();
         }
         ReplayCrimsonEvents.MountRejectedAcllError.Log <Guid, string>(mdbGuid, acllStatus.LastError);
         throw new AmDbMountNotAllowedDueToAcllErrorException(acllStatus.LastError, acllStatus.NumberOfLogsLost);
     }
 }