Remove unused TransactionCallback
Summary: TransactionCallback was never used. Remove it to avoid confusion. Closes https://github.com/facebook/rocksdb/pull/2853 Differential Revision: D5787219 Pulled By: maysamyabandeh fbshipit-source-id: e2b6a89537e3770a269ad38be71c4b0b160a88ac
This commit is contained in:
parent
10ddd59ba7
commit
7e19a571e9
@ -205,26 +205,6 @@ class WriteCommittedTxn : public PessimisticTransaction {
|
||||
void operator=(const WriteCommittedTxn&);
|
||||
};
|
||||
|
||||
// Used at commit time to check whether transaction is committing before its
|
||||
// expiration time.
|
||||
class TransactionCallback : public WriteCallback {
|
||||
public:
|
||||
explicit TransactionCallback(PessimisticTransaction* txn) : txn_(txn) {}
|
||||
|
||||
Status Callback(DB* /* unused */) override {
|
||||
if (txn_->IsExpired()) {
|
||||
return Status::Expired();
|
||||
} else {
|
||||
return Status::OK();
|
||||
}
|
||||
}
|
||||
|
||||
bool AllowWriteBatching() override { return true; }
|
||||
|
||||
private:
|
||||
PessimisticTransaction* txn_;
|
||||
};
|
||||
|
||||
} // namespace rocksdb
|
||||
|
||||
#endif // ROCKSDB_LITE
|
||||
|
Loading…
x
Reference in New Issue
Block a user