From 83957dc510132044263dea7e77206bf83da90cb6 Mon Sep 17 00:00:00 2001 From: Maysam Yabandeh Date: Fri, 3 Jan 2020 13:05:21 -0800 Subject: [PATCH] Exclude MergeInProgress status from errors in stress tests (#6257) Summary: When called on transactions, MultiGet could return a legit MergeInProgress status. The patch excludes this case from errors. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6257 Differential Revision: D19275787 Pulled By: maysamyabandeh fbshipit-source-id: f7158229422af015947e592ae066b4273c9fb9a4 --- db_stress_tool/no_batched_ops_stress.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db_stress_tool/no_batched_ops_stress.cc b/db_stress_tool/no_batched_ops_stress.cc index eed3f8eed..0215b1a7e 100644 --- a/db_stress_tool/no_batched_ops_stress.cc +++ b/db_stress_tool/no_batched_ops_stress.cc @@ -242,6 +242,9 @@ class NonBatchedOpsStressTest : public StressTest { } else if (s.IsNotFound()) { // not found case thread->stats.AddGets(1, 0); + } else if (s.IsMergeInProgress() && use_txn) { + // With txn this is sometimes expected. + thread->stats.AddGets(1, 1); } else { // errors case fprintf(stderr, "MultiGet error: %s\n", s.ToString().c_str());