Tim Armstrong has uploaded a new change for review. http://gerrit.cloudera.org:8080/7182
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 the test. * 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 was 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 malloc()/free(). Testing: Ran ASAN and exhaustive builds. Change-Id: I007d098e9a1abb1f684be37b7f1ee6c03d3879b2 --- M be/src/exec/hdfs-parquet-scanner.cc M be/src/exec/scanner-context.cc M be/src/exec/scanner-context.h M be/src/runtime/disk-io-mgr-scan-range.cc M be/src/runtime/disk-io-mgr-stress.cc M be/src/runtime/disk-io-mgr-test.cc M be/src/runtime/disk-io-mgr.cc M be/src/runtime/disk-io-mgr.h M be/src/runtime/row-batch.cc M be/src/runtime/row-batch.h M be/src/runtime/tmp-file-mgr.cc 11 files changed, 134 insertions(+), 195 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/82/7182/1 -- To view, visit http://gerrit.cloudera.org:8080/7182 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I007d098e9a1abb1f684be37b7f1ee6c03d3879b2 Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Tim Armstrong <[email protected]>
