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; } } }
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; } }
public virtual void Panic(Exception cause) { DatabaseHealth.panic(cause); }