From 536f77974f867a78971c1a7bc0c5240730630375 Mon Sep 17 00:00:00 2001 From: yuval-io <105581454+Yuval-Ariel@users.noreply.github.com> Date: Mon, 29 Jan 2024 13:25:57 +0200 Subject: [PATCH] stress test: Disable IsDone which conflicts with the trace file (#816) Adding a trace file by default in PR https://github.com/speedb-io/speedb/pull/797 has revealed some incompatibilities between the trace file and several configurations (more details in https://github.com/speedb-io/speedb/issues/813). Keep the trace file and remove the IsDone assertion. --- HISTORY.md | 1 + db_stress_tool/expected_state.cc | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 825f22e84e..f8ab24ab3f 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -29,6 +29,7 @@ db_stress has been updated as well to take into account that some memtables do n RocksDB has a value of 10 by default and we've added the option to randomize the values from 0 to 100 in https://github.com/speedb-io/speedb/commit/434692a63318036a3995a53001337f18bf467903 * Add more checks for using db_stress with --enable_speedb_features=true * Proactive Flushes: Have the initiator return a correct answer when it was requested to initate a flush (#812). +* stress test: Adding a trace file by default in PR https://github.com/speedb-io/speedb/pull/797 has revealed some incompatibilities between the trace file and several configurations (more details in https://github.com/speedb-io/speedb/issues/813). Keep the trace file and remove the IsDone assertion. ### Miscellaneous * Remove leftover references to ROCKSDB_LITE (#755). diff --git a/db_stress_tool/expected_state.cc b/db_stress_tool/expected_state.cc index 443e021454..9fa8d83bbb 100644 --- a/db_stress_tool/expected_state.cc +++ b/db_stress_tool/expected_state.cc @@ -396,7 +396,15 @@ class ExpectedStateTraceRecordHandler : public TraceRecord::Handler, state_(state), buffered_writes_(nullptr) {} - ~ExpectedStateTraceRecordHandler() { assert(IsDone()); } + ~ExpectedStateTraceRecordHandler() { + fprintf( + stderr, + "WARNING: ~ExpectedStateTraceRecordHandler - num_write_ops_: %" PRIu64 + " max_write_ops_: %" PRIu64 "\n", + num_write_ops_, max_write_ops_); + // assert(IsDone()) + ; + } // True if we have already reached the limit on write operations to apply. bool IsDone() { return num_write_ops_ == max_write_ops_; }