]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/options/options_sanity_check.cc
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
8 #include "options/options_sanity_check.h"
10 namespace ROCKSDB_NAMESPACE
{
13 OptionsSanityCheckLevel
SanityCheckLevelHelper(
14 const std::unordered_map
<std::string
, OptionsSanityCheckLevel
>& smap
,
15 const std::string
& name
) {
16 auto iter
= smap
.find(name
);
17 return iter
!= smap
.end() ? iter
->second
: kSanityLevelExactMatch
;
21 OptionsSanityCheckLevel
DBOptionSanityCheckLevel(
22 const std::string
& option_name
) {
23 return SanityCheckLevelHelper(sanity_level_db_options
, option_name
);
26 OptionsSanityCheckLevel
CFOptionSanityCheckLevel(
27 const std::string
& option_name
) {
28 return SanityCheckLevelHelper(sanity_level_cf_options
, option_name
);
31 OptionsSanityCheckLevel
BBTOptionSanityCheckLevel(
32 const std::string
& option_name
) {
33 return SanityCheckLevelHelper(sanity_level_bbt_options
, option_name
);
36 } // namespace ROCKSDB_NAMESPACE
38 #endif // !ROCKSDB_LITE