[Impala-ASF-CR] IMPALA-4138: Fix AcquireState() for batches that change capacity

2016-09-16 Thread Henry Robinson (Code Review)
Henry Robinson has posted comments on this change.

Change subject: IMPALA-4138: Fix AcquireState() for batches that change capacity
..


Patch Set 4:

(2 comments)

Rebased to include IMPALA_ASSERT_DEBUG_DEATH macro from trunk.

http://gerrit.cloudera.org:8080/#/c/4428/4//COMMIT_MSG
Commit Message:

PS4, Line 11: this is usually calculated from
: capacity()
> are there places that incorrectly use capacity() that should be changed to 
I have one in my upcoming patch for IMPALA-2905. Independently, this seems like 
a shortcoming in the API - there's no way to do AcquireState() after capacity 
changes without sharing knowledge of the initial capacity through a separate 
channel.

Otherwise there are a couple of AcquireState() calls, but they use row batches 
that have been initialized with RuntimeState::batch_size() rows.


http://gerrit.cloudera.org:8080/#/c/4428/4/be/src/runtime/row-batch.h
File be/src/runtime/row-batch.h:

PS4, Line 360: capacity_
> not due to your change, but this comment should be fixed.
Done


-- 
To view, visit http://gerrit.cloudera.org:8080/4428
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6ceca53c406b05cd04b7d95a4f9f2eec7bc127f5
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Henry Robinson 
Gerrit-Reviewer: Dan Hecht 
Gerrit-Reviewer: Henry Robinson 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-4138: Fix AcquireState() for batches that change capacity

2016-09-16 Thread Henry Robinson (Code Review)
Hello Tim Armstrong,

I'd like you to reexamine a change.  Please visit

http://gerrit.cloudera.org:8080/4428

to look at the new patch set (#5).

Change subject: IMPALA-4138: Fix AcquireState() for batches that change capacity
..

IMPALA-4138: Fix AcquireState() for batches that change capacity

If MarkAtCapacity() is called on a row batch, it is difficult to call
AcquireState() on that batch because tuple_ptrs_size_ is not accessible
to initialise the destination batch - this is usually calculated from
capacity(), but that value is wrong for these purposes after
MarkAtCapacity().

Add RowBatch::InitialCapacity() to return the initial capacity value of
the batch.

Add row-batch-test to add initial coverage of AcquireState() API.

Change-Id: I6ceca53c406b05cd04b7d95a4f9f2eec7bc127f5
---
M be/src/runtime/CMakeLists.txt
A be/src/runtime/row-batch-test.cc
M be/src/runtime/row-batch.cc
M be/src/runtime/row-batch.h
4 files changed, 78 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/28/4428/5
-- 
To view, visit http://gerrit.cloudera.org:8080/4428
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6ceca53c406b05cd04b7d95a4f9f2eec7bc127f5
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Henry Robinson 
Gerrit-Reviewer: Dan Hecht 
Gerrit-Reviewer: Henry Robinson 
Gerrit-Reviewer: Tim Armstrong