@ -29,7 +29,7 @@ namespace ROCKSDB_NAMESPACE {
PessimisticTransactionDB : : PessimisticTransactionDB (
PessimisticTransactionDB : : PessimisticTransactionDB (
DB * db , const TransactionDBOptions & txn_db_options )
DB * db , const TransactionDBOptions & txn_db_options )
: TransactionDB ( db ) ,
: TransactionDB ( db ) ,
db_impl_ ( static_cast_with_check < DBImpl , DB > ( db ) ) ,
db_impl_ ( static_cast_with_check < DBImpl > ( db ) ) ,
txn_db_options_ ( txn_db_options ) ,
txn_db_options_ ( txn_db_options ) ,
lock_mgr_ ( this , txn_db_options_ . num_stripes , txn_db_options . max_num_locks ,
lock_mgr_ ( this , txn_db_options_ . num_stripes , txn_db_options . max_num_locks ,
txn_db_options_ . max_num_deadlocks ,
txn_db_options_ . max_num_deadlocks ,
@ -60,7 +60,7 @@ PessimisticTransactionDB::PessimisticTransactionDB(
PessimisticTransactionDB : : PessimisticTransactionDB (
PessimisticTransactionDB : : PessimisticTransactionDB (
StackableDB * db , const TransactionDBOptions & txn_db_options )
StackableDB * db , const TransactionDBOptions & txn_db_options )
: TransactionDB ( db ) ,
: TransactionDB ( db ) ,
db_impl_ ( static_cast_with_check < DBImpl , DB > ( db - > GetRootDB ( ) ) ) ,
db_impl_ ( static_cast_with_check < DBImpl > ( db - > GetRootDB ( ) ) ) ,
txn_db_options_ ( txn_db_options ) ,
txn_db_options_ ( txn_db_options ) ,
lock_mgr_ ( this , txn_db_options_ . num_stripes , txn_db_options . max_num_locks ,
lock_mgr_ ( this , txn_db_options_ . num_stripes , txn_db_options . max_num_locks ,
txn_db_options_ . max_num_deadlocks ,
txn_db_options_ . max_num_deadlocks ,
@ -113,7 +113,7 @@ Status PessimisticTransactionDB::Initialize(
Status s = EnableAutoCompaction ( compaction_enabled_cf_handles ) ;
Status s = EnableAutoCompaction ( compaction_enabled_cf_handles ) ;
// create 'real' transactions from recovered shell transactions
// create 'real' transactions from recovered shell transactions
auto dbimpl = static_cast_with_check < DBImpl , DB > ( GetRootDB ( ) ) ;
auto dbimpl = static_cast_with_check < DBImpl > ( GetRootDB ( ) ) ;
assert ( dbimpl ! = nullptr ) ;
assert ( dbimpl ! = nullptr ) ;
auto rtrxs = dbimpl - > recovered_transactions ( ) ;
auto rtrxs = dbimpl - > recovered_transactions ( ) ;
@ -569,8 +569,7 @@ bool PessimisticTransactionDB::TryStealingExpiredTransactionLocks(
void PessimisticTransactionDB : : ReinitializeTransaction (
void PessimisticTransactionDB : : ReinitializeTransaction (
Transaction * txn , const WriteOptions & write_options ,
Transaction * txn , const WriteOptions & write_options ,
const TransactionOptions & txn_options ) {
const TransactionOptions & txn_options ) {
auto txn_impl =
auto txn_impl = static_cast_with_check < PessimisticTransaction > ( txn ) ;
static_cast_with_check < PessimisticTransaction , Transaction > ( txn ) ;
txn_impl - > Reinitialize ( this , write_options , txn_options ) ;
txn_impl - > Reinitialize ( this , write_options , txn_options ) ;
}
}