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

Method CreatePage

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

Source from the content-addressed store, hash-verified

140}
141
142Status BufferPool::CreatePage(
143 ClientHandle* client, int64_t len, PageHandle* handle, const BufferHandle** buffer) {
144 DCHECK(!handle->is_open());
145 DCHECK_GE(len, min_buffer_len_);
146 DCHECK_EQ(len, BitUtil::RoundUpToPowerOfTwo(len));
147
148 BufferHandle new_buffer;
149 // No changes have been made to state yet, so we can cleanly return on error.
150 RETURN_IF_ERROR(AllocateBuffer(client, len, &new_buffer));
151 Page* page = client->impl_->CreatePinnedPage(move(new_buffer));
152 handle->Open(page, client);
153 if (buffer != nullptr) *buffer = &page->buffer;
154 return Status::OK();
155}
156
157void BufferPool::DestroyPage(ClientHandle* client, PageHandle* handle) {
158 if (!handle->is_open()) return; // DestroyPage() should be idempotent.

Callers 7

InitMethod · 0.80
NewWritePageMethod · 0.80
CreatePagesMethod · 0.80
TEST_FFunction · 0.80
CreatePageLoopMethod · 0.80
TestWriteErrorMethod · 0.80

Calls 5

moveFunction · 0.85
OKFunction · 0.85
CreatePinnedPageMethod · 0.80
is_openMethod · 0.45
OpenMethod · 0.45

Tested by 5

CreatePagesMethod · 0.64
TEST_FFunction · 0.64
CreatePageLoopMethod · 0.64
TestWriteErrorMethod · 0.64