From 9bbac08e23067efe8ae2568ba507c73a3cf8c4ad Mon Sep 17 00:00:00 2001 From: "Douglas B. Rumbaugh" Date: Fri, 9 Jun 2023 12:01:18 -0400 Subject: Updated bloom filters to use whole record --- include/shard/WSS.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include/shard/WSS.h') diff --git a/include/shard/WSS.h b/include/shard/WSS.h index 15c8b2e..b2dbb96 100644 --- a/include/shard/WSS.h +++ b/include/shard/WSS.h @@ -83,7 +83,7 @@ public: assert(alloc_size % CACHELINE_SIZE == 0); m_data = (Wrapped*)std::aligned_alloc(CACHELINE_SIZE, alloc_size); - m_bf = new BloomFilter(BF_FPR, buffer->get_tombstone_count(), BF_HASH_FUNCS); + m_bf = new BloomFilter(BF_FPR, buffer->get_tombstone_count(), BF_HASH_FUNCS); size_t offset = 0; m_reccnt = 0; @@ -117,7 +117,7 @@ public: if (m_bf && base->is_tombstone()) { m_tombstone_cnt++; - m_bf->insert(base->rec.key); + m_bf->insert(base->rec); } base++; @@ -150,7 +150,7 @@ public: } } - m_bf = new BloomFilter(BF_FPR, tombstone_count, BF_HASH_FUNCS); + m_bf = new BloomFilter(BF_FPR, tombstone_count, BF_HASH_FUNCS); size_t alloc_size = (attemp_reccnt * sizeof(Wrapped)) + (CACHELINE_SIZE - (attemp_reccnt * sizeof(Wrapped)) % CACHELINE_SIZE); assert(alloc_size % CACHELINE_SIZE == 0); @@ -177,7 +177,7 @@ public: weights.push_back(cursor.ptr->rec.weight); if (m_bf && cursor.ptr->is_tombstone()) { ++m_tombstone_cnt; - if (m_bf) m_bf->insert(cursor.ptr->rec.key); + if (m_bf) m_bf->insert(cursor.ptr->rec); } } pq.pop(); @@ -199,7 +199,7 @@ public: } Wrapped *point_lookup(const R &rec, bool filter=false) { - if (filter && !m_bf->lookup(rec.key)) { + if (filter && !m_bf->lookup(rec)) { return nullptr; } @@ -278,7 +278,7 @@ private: size_t m_reccnt; size_t m_tombstone_cnt; size_t m_group_size; - BloomFilter *m_bf; + BloomFilter *m_bf; }; -- cgit v1.2.3