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

Method UndoMoveEvictedToPinned

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

Source from the content-addressed store, hash-verified

568}
569
570void BufferPool::Client::UndoMoveEvictedToPinned(Page* page) {
571 // We need to get the page back to the evicted state where:
572 // * There is no in-flight read.
573 // * The page's data is on disk referenced by 'write_handle'
574 // * The page has no attached buffer.
575 DCHECK(page->pin_in_flight.Load());
576 page->write_handle->CancelRead();
577 page->pin_in_flight.Store(false);
578
579 unique_lock<mutex> lock(lock_);
580 DCHECK_CONSISTENCY();
581 DCHECK(pinned_pages_.Contains(page));
582 pinned_pages_.Remove(page);
583 // Discard the buffer - the pin was in flight so there was no way that a valid
584 // reference to the buffer's contents was returned since the pin was still in flight.
585 pool_->allocator_->Free(move(page->buffer));
586}
587
588Status BufferPool::Client::FinishMoveEvictedToPinned(Page* page) {
589 SCOPED_TIMER(counters().read_wait_time);

Callers 1

UnpinMethod · 0.80

Calls 7

moveFunction · 0.85
CancelReadMethod · 0.80
LoadMethod · 0.45
StoreMethod · 0.45
ContainsMethod · 0.45
RemoveMethod · 0.45
FreeMethod · 0.45

Tested by

no test coverage detected