impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Impala Public Jenkins (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-5389: simplify BufferDescriptor lifetime
Date Fri, 16 Jun 2017 09:38:24 GMT
Impala Public Jenkins has submitted this change and it was merged.

Change subject: IMPALA-5389: simplify BufferDescriptor lifetime

IMPALA-5389: simplify BufferDescriptor lifetime

This is cleanup to make the code easier to understand in anticipation of
some trickier changes to I/O buffer management for IMPALA-4835. I do
not expect any changes in behaviour as a result of this patch.

* Use unique_ptr to make BufferDescriptor ownership transfer more
  explicit and allow enforcing that the buffers are not leaked via
  a DCHECK in ~BufferDescriptor.
* Remove 'free_buffer_descs_' cache. TCMalloc is good at caching small
  objects and there will likely be a lot less lock contention compared
  with a single global lock. The cache did not avoid calls to
  malloc() anyway because appending to std::list<> requires allocating
  a list node.
* Use std::deque instead of std::list in a couple of places - it offers
  O(1) push_*()/pop_*() at both ends and requires fewer calls into

Ran ASAN and exhaustive builds.

Change-Id: I007d098e9a1abb1f684be37b7f1ee6c03d3879b2
Reviewed-by: Tim Armstrong <>
Tested-by: Impala Public Jenkins
M be/src/exec/
M be/src/exec/
M be/src/exec/scanner-context.h
M be/src/runtime/
M be/src/runtime/
M be/src/runtime/
M be/src/runtime/
M be/src/runtime/disk-io-mgr.h
M be/src/runtime/
M be/src/runtime/row-batch.h
M be/src/runtime/
11 files changed, 137 insertions(+), 202 deletions(-)

  Impala Public Jenkins: Verified
  Tim Armstrong: Looks good to me, approved

To view, visit
To unsubscribe, visit

Gerrit-MessageType: merged
Gerrit-Change-Id: I007d098e9a1abb1f684be37b7f1ee6c03d3879b2
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Henry Robinson <>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Joe McDonnell <>
Gerrit-Reviewer: Tim Armstrong <>

View raw message