This is an automated email from the ASF dual-hosted git repository.
amc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new cf771e3ee7 libswoc: Update IntrusiveHashMap in HostDB. (#9874)
cf771e3ee7 is described below
commit cf771e3ee781a1e872e05229b01fefea3012827e
Author: Alan M. Carroll <[email protected]>
AuthorDate: Mon Jun 26 15:40:11 2023 -0700
libswoc: Update IntrusiveHashMap in HostDB. (#9874)
---
iocore/hostdb/HostDB.cc | 2 +-
iocore/hostdb/P_RefCountCache.h | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index 159005df0e..e510c65562 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -1274,7 +1274,7 @@ HostDBContinuation::iterateEvent(int event, Event *e)
ts::shared_mutex &bucket_lock =
hostDB.refcountcache->get_partition(current_iterate_pos).lock;
std::shared_lock<ts::shared_mutex> lock{bucket_lock};
- IntrusiveHashMap<RefCountCacheLinkage> &partMap =
hostDB.refcountcache->get_partition(current_iterate_pos).get_map();
+ auto &partMap =
hostDB.refcountcache->get_partition(current_iterate_pos).get_map();
for (const auto &it : partMap) {
auto *r = static_cast<HostDBRecord *>(it.item.get());
if (r && !r->is_failed()) {
diff --git a/iocore/hostdb/P_RefCountCache.h b/iocore/hostdb/P_RefCountCache.h
index fba8e1156a..c227eb8068 100644
--- a/iocore/hostdb/P_RefCountCache.h
+++ b/iocore/hostdb/P_RefCountCache.h
@@ -25,7 +25,8 @@
#include <I_EventSystem.h>
#include <P_EventSystem.h> // TODO: less? just need ET_TASK
-#include "tscore/IntrusiveHashMap.h"
+#include "swoc/IntrusiveHashMap.h"
+
#include "tscore/PriorityQueue.h"
#include "tscore/List.h"
@@ -159,7 +160,7 @@ protected:
template <class C> class RefCountCachePartition : private RefCountCacheBase
{
public:
- using hash_type = IntrusiveHashMap<RefCountCacheLinkage>;
+ using hash_type = swoc::IntrusiveHashMap<RefCountCacheLinkage>;
RefCountCachePartition(unsigned int part_num, uint64_t max_size, unsigned
int max_items, RecRawStatBlock *rsb = nullptr);
Ptr<C> get(uint64_t key);
@@ -365,7 +366,7 @@ RefCountCachePartition<C>::metric_inc(RefCountCache_Stats
metric_enum, int64_t d
}
template <class C>
-IntrusiveHashMap<RefCountCacheLinkage> &
+swoc::IntrusiveHashMap<RefCountCacheLinkage> &
RefCountCachePartition<C>::get_map()
{
return this->item_map;