提交 4dfaa661 编写于 作者: R Reid Horuff

Make IsDeadlockDetect() virtual member of Transaction

Summary: Make `IsDeadlockDetect()` virtual member of base class `Transaction` for ease of use in MyRocks

Test Plan: compiles. compiles into MyRocks call-site.

Reviewers: mung

Reviewed By: mung

Subscribers: andrewkr, dhruba

Differential Revision: https://reviews.facebook.net/D65385
上级 59a7c033
......@@ -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);
......
......@@ -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_; }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册