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

Method Insert

be/src/kudu/util/cache.cc:123–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121 }
122
123 RLHandle* Insert(RLHandle* h) {
124 RLHandle** ptr = FindPointer(h->key(), h->hash);
125 RLHandle* old = *ptr;
126 h->next_hash = (old == nullptr ? nullptr : old->next_hash);
127 *ptr = h;
128 if (old == nullptr) {
129 ++elems_;
130 if (elems_ > length_) {
131 // Since each cache entry is fairly large, we aim for a small
132 // average linked list length (<= 1).
133 Resize();
134 }
135 }
136 return old;
137 }
138
139 RLHandle* Remove(const Slice& key, uint32_t hash) {
140 RLHandle** ptr = FindPointer(key, hash);

Callers

nothing calls this directly

Calls 1

keyMethod · 0.45

Tested by

no test coverage detected