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

Method TransferBuffer

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

Source from the content-addressed store, hash-verified

262}
263
264Status BufferPool::TransferBuffer(ClientHandle* src_client, BufferHandle* src,
265 ClientHandle* dst_client, BufferHandle* dst) {
266 DCHECK(src->is_open());
267 DCHECK(!dst->is_open());
268 DCHECK_EQ(src_client, src->client_);
269 DCHECK_NE(src, dst);
270 DCHECK_NE(src_client, dst_client);
271
272 dst_client->impl_->reservation()->AllocateFrom(src->len());
273 src_client->impl_->reservation()->ReleaseTo(src->len());
274 *dst = std::move(*src);
275 dst->client_ = dst_client;
276 return Status::OK();
277}
278
279void BufferPool::Maintenance() {
280 allocator_->Maintenance();

Callers 1

TEST_FFunction · 0.80

Calls 7

moveFunction · 0.85
OKFunction · 0.85
AllocateFromMethod · 0.80
ReleaseToMethod · 0.80
is_openMethod · 0.45
reservationMethod · 0.45
lenMethod · 0.45

Tested by 1

TEST_FFunction · 0.64