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

Method TryAddPage

be/src/runtime/sorter.cc:668–685  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

666}
667
668Status Sorter::Run::TryAddPage(
669 AddPageMode mode, vector<Page>* page_sequence, bool* added) {
670 DCHECK(!page_sequence->empty());
671 if (mode == KEEP_PREV_PINNED) {
672 if (!sorter_->buffer_pool_client_->IncreaseReservationToFit(sorter_->page_len_)) {
673 *added = false;
674 return Status::OK();
675 }
676 } else {
677 DCHECK(mode == UNPIN_PREV);
678 // Unpin the prev page to free up the memory required to pin the next page.
679 page_sequence->back().Unpin(sorter_->buffer_pool_client_);
680 }
681
682 RETURN_IF_ERROR(AddPage(page_sequence));
683 *added = true;
684 return Status::OK();
685}
686
687Status Sorter::Run::AddPage(vector<Page>* page_sequence) {
688 Page new_page;

Callers

nothing calls this directly

Calls 4

OKFunction · 0.85
emptyMethod · 0.45
UnpinMethod · 0.45

Tested by

no test coverage detected