diff --git a/include/rocksdb/utilities/transaction.h b/include/rocksdb/utilities/transaction.h index 44195778a..50b2167cd 100644 --- a/include/rocksdb/utilities/transaction.h +++ b/include/rocksdb/utilities/transaction.h @@ -399,6 +399,8 @@ class Transaction { virtual TransactionID GetID() const { return 0; } + virtual bool IsDeadlockDetect() const { return false; } + virtual TransactionID GetWaitingTxn(uint32_t* column_family_id, const std::string** key) const { assert(false); diff --git a/utilities/transactions/transaction_impl.h b/utilities/transactions/transaction_impl.h index 252a42ae5..4dfea9be5 100644 --- a/utilities/transactions/transaction_impl.h +++ b/utilities/transactions/transaction_impl.h @@ -91,7 +91,7 @@ class TransactionImpl : public TransactionBaseImpl { // Returns true if locks were stolen successfully, false otherwise. bool TryStealingLocks(); - bool IsDeadlockDetect() const { return deadlock_detect_; } + bool IsDeadlockDetect() const override { return deadlock_detect_; } int64_t GetDeadlockDetectDepth() const { return deadlock_detect_depth_; }