Skip to content

Commit

Permalink
db_bench: fix for issue #290
Browse files Browse the repository at this point in the history
Added logic in `OpenAllDbs()` to handle the case where the `-optimistic_transaction_db` option is used.
  • Loading branch information
andy-byers committed Jan 24, 2023
1 parent bb4eca5 commit 5678018
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tools/db_bench_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2952,9 +2952,19 @@ class Benchmark {
} else {
auto wal_dir = options.wal_dir;
for (int i = 0; i < FLAGS_num_multi_db; i++) {
if (dbs_[i].db || dbs_[i].opt_txn_db) {
#ifndef ROCKSDB_LITE
if (FLAGS_optimistic_transaction_db) {
if (dbs_[i].opt_txn_db) {
continue;
}
} else if (dbs_[i].db) {
continue;
}
#else // ROCKSDB_LITE
if (dbs_[i].db) {
continue;
}
#endif // ROCKSDB_LITE
if (!wal_dir.empty()) {
options.wal_dir = GetPathForMultiple(wal_dir, i);
}
Expand Down

0 comments on commit 5678018

Please sign in to comment.