From d5f3b77f23b2fbd887f6af045d5f8785ba4caa9c Mon Sep 17 00:00:00 2001 From: Peter Dillinger Date: Mon, 19 Jul 2021 08:09:35 -0700 Subject: [PATCH] Add GetMapProperty to db_stress (#8551) Summary: Already has good coverage for GetProperty and GetIntProperty but this one was missing. This should add more confidence to https://github.com/facebook/rocksdb/issues/8538 Pull Request resolved: https://github.com/facebook/rocksdb/pull/8551 Test Plan: brief local run with boosted probability showed no immediate issues Reviewed By: siying Differential Revision: D29746383 Pulled By: pdillinger fbshipit-source-id: 9f9f525bc1a7607f85e563e33bda1979ef197127 --- db_stress_tool/db_stress_test_base.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/db_stress_tool/db_stress_test_base.cc b/db_stress_tool/db_stress_test_base.cc index a7a23707f..f42d92438 100644 --- a/db_stress_tool/db_stress_test_base.cc +++ b/db_stress_tool/db_stress_test_base.cc @@ -1766,6 +1766,14 @@ void StressTest::TestGetProperty(ThreadState* thread) const { thread->shared->SetVerificationFailure(); } } + if (ppt_name_and_info.second.handle_map != nullptr) { + std::map prop_map; + if (!db_->GetMapProperty(ppt_name_and_info.first, &prop_map)) { + fprintf(stderr, "Failed to get Map property: %s\n", + ppt_name_and_info.first.c_str()); + thread->shared->SetVerificationFailure(); + } + } } }