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

Method FindPointer

be/src/kudu/util/cache.cc:159–166  ·  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

157 // matches key/hash. If there is no such cache entry, return a
158 // pointer to the trailing slot in the corresponding linked list.
159 RLHandle** FindPointer(const Slice& key, uint32_t hash) {
160 RLHandle** ptr = &list_[hash & (length_ - 1)];
161 while (*ptr != nullptr &&
162 ((*ptr)->hash != hash || key != (*ptr)->key())) {
163 ptr = &(*ptr)->next_hash;
164 }
165 return ptr;
166 }
167
168 void Resize() {
169 uint32_t new_length = 16;

Callers

nothing calls this directly

Calls 1

keyMethod · 0.45

Tested by

no test coverage detected