Tim Armstrong has uploaded this change for review. ( http://gerrit.cloudera.org:8080/11283
Change subject: IMPALA-7402: fix DCHECK when releasing reservation in scan ...................................................................... IMPALA-7402: fix DCHECK when releasing reservation in scan The bug is that ScannerContext::Stream::GetNextBuffer(), when reading past the end of a scan range and ScanRange::GetNext() returned cancelled, did not wait for buffers owned by the scan range to be freed. Subsequent code assumes that all buffers allocated by the scanner are freed after HdfsScanner::Close() returns, but this was not guaranteed. The fix is to strengthen the post-condition of ScanRange::GetNext() so that buffers are guaranteed to be returned when GetNext() returns CANCELLED. Testing: Added a unit test that tests the new invariant. Manually tested that this fixed the regression by inserting a 10ms sleep in BufferPool::FreeBuffer() and looping the test that failed. Ran DiskIoMgrStressTest overnight and ran core tests. Change-Id: I445d306de0c6bfb71359100de2fdf3cd4326f6d9 --- M be/src/runtime/bufferpool/buffer-pool.cc M be/src/runtime/io/disk-io-mgr-test.cc M be/src/runtime/io/request-ranges.h M be/src/runtime/io/scan-range.cc 4 files changed, 63 insertions(+), 7 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/83/11283/1 -- To view, visit http://gerrit.cloudera.org:8080/11283 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I445d306de0c6bfb71359100de2fdf3cd4326f6d9 Gerrit-Change-Number: 11283 Gerrit-PatchSet: 1 Gerrit-Owner: Tim Armstrong <[email protected]>
