Fix a bug in crash_test_with_txn (#6860)

Summary:
In NoBatchedOpsStress::TestMultiGet, call txn->Get() when transactions
are in use.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6860

Test Plan: make crash_test_with_txn

Reviewed By: pdillinger

Differential Revision: D21667249

Pulled By: anand1976

fbshipit-source-id: 194bd7b9630a8efc3ae29d85422a61214e9e200e
main
anand76 5 years ago committed by Facebook GitHub Bot
parent 545e14b53b
commit eb04bb86c6
  1. 8
      db_stress_tool/no_batched_ops_stress.cc

@ -363,7 +363,13 @@ class NonBatchedOpsStressTest : public StressTest {
Status tmp_s;
std::string value;
tmp_s = db_->Get(readoptionscopy, cfh, keys[i], &value);
if (use_txn) {
#ifndef ROCKSDB_LITE
tmp_s = txn->Get(readoptionscopy, cfh, keys[i], &value);
#endif // ROCKSDB_LITE
} else {
tmp_s = db_->Get(readoptionscopy, cfh, keys[i], &value);
}
if (!tmp_s.ok() && !tmp_s.IsNotFound()) {
fprintf(stderr, "Get error: %s\n", s.ToString().c_str());
is_consistent = false;

Loading…
Cancel
Save