refine code (#6420)
Summary: I create a new branch from the branch new upsteram/master and "git merge --squash". Maybe it will fix everything. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6420 Differential Revision: D19897152 Pulled By: zhichao-cao fbshipit-source-id: 6575d9e3b23e360f42ee1480b43028b5fcc20136
This commit is contained in:
parent
908b1ee64e
commit
29e24434fe
@ -59,13 +59,13 @@ Status OptimisticTransaction::Commit() {
|
||||
auto txn_db_impl = static_cast_with_check<OptimisticTransactionDBImpl,
|
||||
OptimisticTransactionDB>(txn_db_);
|
||||
assert(txn_db_impl);
|
||||
OccValidationPolicy policy = txn_db_impl->GetValidatePolicy();
|
||||
if (policy == OccValidationPolicy::kValidateParallel) {
|
||||
return CommitWithParallelValidate();
|
||||
} else if (policy == OccValidationPolicy::kValidateSerial) {
|
||||
return CommitWithSerialValidate();
|
||||
} else {
|
||||
assert(0);
|
||||
switch (txn_db_impl->GetValidatePolicy()) {
|
||||
case OccValidationPolicy::kValidateParallel:
|
||||
return CommitWithParallelValidate();
|
||||
case OccValidationPolicy::kValidateSerial:
|
||||
return CommitWithSerialValidate();
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
// unreachable, just void compiler complain
|
||||
return Status::OK();
|
||||
|
Loading…
Reference in New Issue
Block a user