From 557748ff7b020f0cdef913c6cc84ad7c2aa45f60 Mon Sep 17 00:00:00 2001 From: Islam AbdelRahman Date: Fri, 29 Jul 2016 11:02:03 -0700 Subject: [PATCH] Fix db_stress failure (pass merge_operator even if not used) Summary: db_stress test is now failing because of this scenario - run db_stress with merge_operator enabled (now we have a db with merge operands) - run db_stress with merge_operator disabled (now when we fail to open the db) the solution is to pass the merge_operator to the DB even if we are not going to do any merge operations Test Plan: Check the failure Reviewers: andrewkr, yiwu, sdong Reviewed By: sdong Subscribers: andrewkr, dhruba Differential Revision: https://reviews.facebook.net/D61311 --- tools/db_stress.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/db_stress.cc b/tools/db_stress.cc index ceafe6b4a..9795230fe 100644 --- a/tools/db_stress.cc +++ b/tools/db_stress.cc @@ -2109,12 +2109,10 @@ class StressTest { #endif // ROCKSDB_LITE } - if (FLAGS_use_merge) { - if (FLAGS_use_full_merge_v1) { - options_.merge_operator = MergeOperators::CreateDeprecatedPutOperator(); - } else { - options_.merge_operator = MergeOperators::CreatePutOperator(); - } + if (FLAGS_use_full_merge_v1) { + options_.merge_operator = MergeOperators::CreateDeprecatedPutOperator(); + } else { + options_.merge_operator = MergeOperators::CreatePutOperator(); } // set universal style compaction configurations, if applicable