Beispiel #1
0
        // Token: 0x06000463 RID: 1123 RVA: 0x00017604 File Offset: 0x00015804
        public override RpcErrorExceptionInfo AttemptCopyLastLogsDirect(Guid guid, int mountDialOverride, int numRetries, int e00timeoutMs, int networkIOtimeoutMs, int networkConnecttimeoutMs, string sourceServer, int iActionCode, int skipValidationChecks, bool mountPending, string uniqueOperationId, int subactionAttemptNumber, ref AmAcllReturnStatus acllStatus)
        {
            AmTrace.Debug("Running ACLL for database (on behalf of PAM): {0}", new object[]
            {
                guid
            });
            AmAcllReturnStatus tempAcllStatus = null;

            acllStatus = null;
            AmAcllArgs acllArgs = new AmAcllArgs();

            acllArgs.NumRetries              = numRetries;
            acllArgs.E00TimeoutMs            = e00timeoutMs;
            acllArgs.NetworkIOTimeoutMs      = networkIOtimeoutMs;
            acllArgs.NetworkConnectTimeoutMs = networkConnecttimeoutMs;
            acllArgs.SourceServer            = new AmServerName(sourceServer);
            acllArgs.ActionCode              = new AmDbActionCode(iActionCode);
            acllArgs.SkipValidationChecks    = (AmBcsSkipFlags)skipValidationChecks;
            acllArgs.MountPending            = mountPending;
            acllArgs.MountDialOverride       = (DatabaseMountDialOverride)mountDialOverride;
            acllArgs.UniqueOperationId       = uniqueOperationId;
            acllArgs.SubactionAttemptNumber  = subactionAttemptNumber;
            RpcErrorExceptionInfo result = AmRpcExceptionWrapper.Instance.RunRpcServerOperation(delegate()
            {
                AmRpcServer.m_amInstance.AttemptCopyLastLogsDirect(guid, acllArgs, ref tempAcllStatus);
            });

            acllStatus = tempAcllStatus;
            return(result);
        }
Beispiel #2
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);
     }
 }
Beispiel #3
0
        private void RunAttemptCopyLastLogsOnServer(AmServerName serverToMount, AmServerName sourceServer, DatabaseMountDialOverride mountDialOverride, AmBcsSkipFlags skipValidationChecks, int numRetries, int e00timeoutMs, int networkIOtimeoutMs, int networkConnecttimeoutMs, out bool fLossyMountEnabled, ref AmAcllReturnStatus acllStatus)
        {
            acllStatus = null;
            bool flag = false;

            fLossyMountEnabled = false;
            try
            {
                base.ReportStatus(AmDbActionStatus.AcllInitiated);
                AmAcllArgs amAcllArgs = new AmAcllArgs();
                amAcllArgs.NumRetries              = numRetries;
                amAcllArgs.E00TimeoutMs            = e00timeoutMs;
                amAcllArgs.NetworkIOTimeoutMs      = networkIOtimeoutMs;
                amAcllArgs.NetworkConnectTimeoutMs = networkConnecttimeoutMs;
                amAcllArgs.SourceServer            = sourceServer;
                amAcllArgs.ActionCode              = base.ActionCode;
                amAcllArgs.MountDialOverride       = mountDialOverride;
                amAcllArgs.SkipValidationChecks    = skipValidationChecks;
                amAcllArgs.UniqueOperationId       = base.UniqueOperationId;
                amAcllArgs.SubactionAttemptNumber  = base.CurrentAttemptNumber;
                if (base.State.IsAdminDismounted && !base.ActionCode.IsAdminMountOperation)
                {
                    amAcllArgs.MountPending = false;
                }
                else
                {
                    amAcllArgs.MountPending = true;
                }
                AmDbAction.AttemptCopyLastLogsDirect(serverToMount, base.DatabaseGuid, amAcllArgs, ref acllStatus);
                fLossyMountEnabled = (!acllStatus.NoLoss && acllStatus.MountAllowed);
                flag = true;
                base.ReportStatus(AmDbActionStatus.AcllSuccessful);
            }
            finally
            {
                if (!flag)
                {
                    base.ReportStatus(AmDbActionStatus.AcllFailed);
                }
            }
        }
Beispiel #4
0
 internal static void AttemptCopyLastLogsDirect(AmServerName serverName, Guid dbGuid, AmAcllArgs acllArgs, ref AmAcllReturnStatus acllStatus)
 {
     acllStatus = null;
     Dependencies.AmRpcClientWrapper.AttemptCopyLastLogsDirect(serverName.Fqdn, dbGuid, acllArgs.MountDialOverride, acllArgs.NumRetries, acllArgs.E00TimeoutMs, acllArgs.NetworkIOTimeoutMs, acllArgs.NetworkConnectTimeoutMs, acllArgs.SourceServer.Fqdn, (int)acllArgs.ActionCode, (int)acllArgs.SkipValidationChecks, acllArgs.MountPending, acllArgs.UniqueOperationId, acllArgs.SubactionAttemptNumber, ref acllStatus);
 }