MCPcopy Create free account
hub / github.com/apache/impala / FindPointer

Method FindPointer

be/src/util/cache/cache-internal.h:152–159  ·  view source on GitHub ↗

Return a pointer to slot that points to a cache entry that matches key/hash. If there is no such cache entry, return a pointer to the trailing slot in the corresponding linked list.

Source from the content-addressed store, hash-verified

150 // matches key/hash. If there is no such cache entry, return a
151 // pointer to the trailing slot in the corresponding linked list.
152 HandleBase** FindPointer(const Slice& key, uint32_t hash) {
153 HandleBase** ptr = &list_[hash & (length_ - 1)];
154 while (*ptr != nullptr &&
155 ((*ptr)->hash() != hash || key != (*ptr)->key())) {
156 ptr = &(*ptr)->next_handle_;
157 }
158 return ptr;
159 }
160
161 void Resize() {
162 uint32_t new_length = 16;

Callers

nothing calls this directly

Calls 2

hashMethod · 0.80
keyMethod · 0.45

Tested by

no test coverage detected