delete unnessary pointer cast in beginInternalTransaction() function
Summary: use of dynamic_cast<TransactionImpl*> is unnecessary and also introduce difficulty for fbrocksdb support of TransactionDB Test Plan: ./transaction_test Reviewers: sdong, IslamAbdelRahman, andrewkr Reviewed By: andrewkr Subscribers: andrewkr, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D60501
This commit is contained in:
parent
e1b3ee8a79
commit
7c190070b4
@ -225,12 +225,8 @@ Transaction* TransactionDBImpl::BeginInternalTransaction(
|
|||||||
TransactionOptions txn_options;
|
TransactionOptions txn_options;
|
||||||
Transaction* txn = BeginTransaction(options, txn_options, nullptr);
|
Transaction* txn = BeginTransaction(options, txn_options, nullptr);
|
||||||
|
|
||||||
assert(dynamic_cast<TransactionImpl*>(txn) != nullptr);
|
|
||||||
auto txn_impl = reinterpret_cast<TransactionImpl*>(txn);
|
|
||||||
|
|
||||||
// Use default timeout for non-transactional writes
|
// Use default timeout for non-transactional writes
|
||||||
txn_impl->SetLockTimeout(txn_db_options_.default_lock_timeout);
|
txn->SetLockTimeout(txn_db_options_.default_lock_timeout);
|
||||||
|
|
||||||
return txn;
|
return txn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user