Xuebin Su has uploaded a new patch set (#3). ( 
http://gerrit.cloudera.org:8080/21741 )

Change subject: IMPALA-13286: Make stream row counters 64-bit
......................................................................

IMPALA-13286: Make stream row counters 64-bit

Previously, adding a large number of zero-sized rows to a
BufferedTupleStream could cause impalad to crash. This was because
the row counters for a page include

- Page::num_rows, and
- ReadIterator::read_page_rows_returned_

were 32-bit integers. When the row size is zero, all rows are
added to one single page. And if the number of rows in the whole
stream exceeds the limit, the two counters will overflow, making the
DCHECK failed.

This patch fixes the issue by making the row counters 64-bit integers
so that they will not easily overflow even when row size is zero.
DCHECKs are also added to make sure that overflow will not happen.

Testing:
- Added unit test StreamStateTest::TestAddAndGetZeroSizedRows to ensure
  it is OK to add and get rows when the number of rows in the stream
  exceeds INT_MAX or UINT_MAX.
- Ran the previously failed query manually and it completed with the
  correct result after the patch.

Change-Id: I4d4cf8f424360717de0c4a5571a638a4c11b9606
---
M be/src/runtime/buffered-tuple-stream-test.cc
M be/src/runtime/buffered-tuple-stream.cc
M be/src/runtime/buffered-tuple-stream.h
3 files changed, 112 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/41/21741/3
--
To view, visit http://gerrit.cloudera.org:8080/21741
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4d4cf8f424360717de0c4a5571a638a4c11b9606
Gerrit-Change-Number: 21741
Gerrit-PatchSet: 3
Gerrit-Owner: Xuebin Su <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Riza Suminto <[email protected]>
Gerrit-Reviewer: Xuebin Su <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>

Reply via email to