コード例 #1
0
        private void MatchAgainstExpectedTransactionIdIfAny(long transactionId, TransactionToApply tx)
        {
            long expectedTransactionId = tx.TransactionId();

            if (expectedTransactionId != TRANSACTION_ID_NOT_SPECIFIED)
            {
                if (transactionId != expectedTransactionId)
                {
                    System.InvalidOperationException ex = new System.InvalidOperationException("Received " + tx.TransactionRepresentation() + " with txId:" + expectedTransactionId + " to be applied, but appending it ended up generating an unexpected txId:" + transactionId);
                    _databaseHealth.panic(ex);
                    throw ex;
                }
            }
        }
コード例 #2
0
 private void Panic(Exception e)
 {
     lock (this)
     {
         _log.error("Unexpected issue in catchup process. No more catchup requests will be scheduled.", e);
         _dbHealth.panic(e);
         _upToDateFuture.completeExceptionally(e);
         _state = PANIC;
     }
 }
コード例 #3
0
 public virtual void Panic(Exception cause)
 {
     DatabaseHealth.panic(cause);
 }