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

Method FinishMoveEvictedToPinned

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

Source from the content-addressed store, hash-verified

586}
587
588Status BufferPool::Client::FinishMoveEvictedToPinned(Page* page) {
589 SCOPED_TIMER(counters().read_wait_time);
590 lock_guard<SpinLock> pl(page->buffer_lock);
591 // Another thread may have moved it to pinned in the meantime.
592 if (!page->pin_in_flight.Load()) return Status::OK();
593 // Don't hold any locks while reading back the data. It is safe to modify the page's
594 // buffer handle without holding any locks because no concurrent operations can modify
595 // evicted pages.
596 RETURN_IF_ERROR(file_group_->WaitForAsyncRead(
597 page->write_handle.get(), page->buffer.mem_range(), &counters_));
598 file_group_->DestroyWriteHandle(move(page->write_handle));
599 page->pin_in_flight.Store(false);
600 return Status::OK();
601}
602
603Status BufferPool::Client::PrepareToAllocateBuffer(
604 int64_t len, bool reserved, bool* success) {

Callers 1

GetBufferMethod · 0.80

Calls 8

OKFunction · 0.85
moveFunction · 0.85
WaitForAsyncReadMethod · 0.80
mem_rangeMethod · 0.80
DestroyWriteHandleMethod · 0.80
getMethod · 0.65
LoadMethod · 0.45
StoreMethod · 0.45

Tested by

no test coverage detected