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

Method StartMoveEvictedToPinned

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

Source from the content-addressed store, hash-verified

550}
551
552Status BufferPool::Client::StartMoveEvictedToPinned(
553 unique_lock<mutex>* client_lock, ClientHandle* client, Page* page) {
554 DCHECK(!page->buffer.is_open());
555
556 // Safe to modify the page's buffer handle without holding the page lock because no
557 // concurrent operations can modify evicted pages.
558 BufferHandle buffer;
559 RETURN_IF_ERROR(pool_->allocator_->Allocate(client, page->len, &page->buffer));
560 COUNTER_ADD(counters().bytes_read, page->len);
561 COUNTER_ADD(counters().read_io_ops, 1);
562 RETURN_IF_ERROR(
563 file_group_->ReadAsync(page->write_handle.get(), page->buffer.mem_range()));
564 pinned_pages_.Enqueue(page);
565 page->pin_in_flight.Store(true);
566 DCHECK_CONSISTENCY();
567 return Status::OK();
568}
569
570void BufferPool::Client::UndoMoveEvictedToPinned(Page* page) {
571 // We need to get the page back to the evicted state where:

Callers

nothing calls this directly

Calls 8

OKFunction · 0.85
ReadAsyncMethod · 0.80
mem_rangeMethod · 0.80
getMethod · 0.65
is_openMethod · 0.45
AllocateMethod · 0.45
EnqueueMethod · 0.45
StoreMethod · 0.45

Tested by

no test coverage detected