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
This commit is contained in:
Islam AbdelRahman 2016-07-29 11:02:03 -07:00
parent 811ee21112
commit 557748ff7b

View File

@ -2109,13 +2109,11 @@ 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();
}
}
// set universal style compaction configurations, if applicable
if (FLAGS_universal_size_ratio != 0) {