]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/monitoring/thread_status_updater_debug.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 "db/column_family.h"
9 #include "monitoring/thread_status_updater.h"
10 #include "util/cast_util.h"
12 namespace ROCKSDB_NAMESPACE
{
15 #ifdef ROCKSDB_USING_THREAD_STATUS
16 void ThreadStatusUpdater::TEST_VerifyColumnFamilyInfoMap(
17 const std::vector
<ColumnFamilyHandle
*>& handles
, bool check_exist
) {
18 std::unique_lock
<std::mutex
> lock(thread_list_mutex_
);
20 assert(cf_info_map_
.size() == handles
.size());
22 for (auto* handle
: handles
) {
23 auto* cfd
= static_cast_with_check
<ColumnFamilyHandleImpl
>(handle
)->cfd();
24 auto iter
__attribute__((__unused__
)) = cf_info_map_
.find(cfd
);
26 assert(iter
!= cf_info_map_
.end());
27 assert(iter
->second
.cf_name
== cfd
->GetName());
29 assert(iter
== cf_info_map_
.end());
36 void ThreadStatusUpdater::TEST_VerifyColumnFamilyInfoMap(
37 const std::vector
<ColumnFamilyHandle
*>& /*handles*/, bool /*check_exist*/) {
40 #endif // ROCKSDB_USING_THREAD_STATUS
43 } // namespace ROCKSDB_NAMESPACE