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

Method Pin

be/src/runtime/bufferpool/buffer-pool.cc:178–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178Status BufferPool::Pin(ClientHandle* client, PageHandle* handle) {
179 DCHECK(client->is_registered());
180 DCHECK(handle->is_open());
181 DCHECK_EQ(handle->client_, client);
182
183 Page* page = handle->page_;
184 if (page->pin_count == 0) {
185 RETURN_IF_ERROR(client->impl_->StartMoveToPinned(client, page));
186 COUNTER_ADD(client->impl_->counters().peak_unpinned_bytes, -page->len);
187 }
188 // Update accounting last to avoid complicating the error return path above.
189 ++page->pin_count;
190 client->impl_->reservation()->AllocateFrom(page->len);
191 return Status::OK();
192}
193
194void BufferPool::Unpin(ClientHandle* client, PageHandle* handle) {
195 DCHECK(handle->is_open());

Callers 7

PinAllMethod · 0.45
TEST_FFunction · 0.45
CreatePageLoopMethod · 0.45
TestMemoryReclamationMethod · 0.45
TestWriteErrorMethod · 0.45

Calls 6

OKFunction · 0.85
is_registeredMethod · 0.80
StartMoveToPinnedMethod · 0.80
AllocateFromMethod · 0.80
is_openMethod · 0.45
reservationMethod · 0.45

Tested by 7

PinAllMethod · 0.36
TEST_FFunction · 0.36
CreatePageLoopMethod · 0.36
TestMemoryReclamationMethod · 0.36
TestWriteErrorMethod · 0.36