if constexpr (
std::is_base_of_v<typename internal_node_t::base_t, child_node_t>)
{
- assert(!c.cache.query_cache(i->get_val(), nullptr));
+ assert(!c.cache.test_query_cache(i->get_val()));
} else {
if constexpr (leaf_has_children) {
assert(i->get_val().pladdr.is_paddr()
- ? (bool)!c.cache.query_cache(
- i->get_val().pladdr.get_paddr(), nullptr)
+ ? (bool)!c.cache.test_query_cache(
+ i->get_val().pladdr.get_paddr())
: true);
}
}
return epm.get_block_size();
}
+// Interfaces only for tests.
+public:
+ CachedExtentRef test_query_cache(paddr_t offset) {
+ return query_cache(offset, nullptr);
+ }
+
private:
// This is a workaround std::move_only_function not being available,
// not really worth generalizing at this time.
return CachedExtentRef();
}
}
-
- template <
- typename node_key_t,
- typename node_val_t,
- typename internal_node_t,
- typename leaf_node_t,
- typename pin_t,
- size_t node_size,
- bool leaf_has_children>
- friend class FixedKVBtree;
};
using CacheRef = std::unique_ptr<Cache>;