impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Ho (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-3946: fix MemPool integrity issues with empty chunks
Date Wed, 10 Aug 2016 02:00:59 GMT
Michael Ho has posted comments on this change.

Change subject: IMPALA-3946: fix MemPool integrity issues with empty chunks

Patch Set 1:

File be/src/runtime/

PS1, Line 435: Empty chunk
May be I misunderstood it but I think you meant the chunk from src isn't transferred. Whether
the chunk is transferred should have nothing to do whether the chunk is empty or not, right
File be/src/runtime/

PS1, Line 105: int first_free_idx = 0;
IMHO, It may be slightly clearer to make the assignment of this variable more explicit:

if (UNLIKELY(current_chunk_idx_ == -1)) {
    first_free_idx = 0;
} else {
    DCHECK_GE(current_chunk_idx, 0);
    first_free_idx = current_chunk_idx_ + (chunks_[current_chunk_idx_]  > 0);
    // Always start at current_chunk_idx + 1 as we know the current chunk cannot fit.
    for (int idx = current_chunk_idx_ + 1; idx < chunks_.size(); ++idx) {

It would be great to also document that the reason there can be a list of free chunks after
the current chunk is a result of calling Clear() in the past. That always confuses me when
I read this function without reading other functions at the same time.

PS1, Line 215: false
Is there a reason why this cannot be !keep_current || src->GetFreeOffset() > 0 ?

PS1, Line 260:  if (current_chunk_empty)
Can we keep the stricter check we had before if we modify line 215 ?

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I03ad12e5b2b63cbb55e5c52562416d73a4bd9346
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <>
Gerrit-Reviewer: Michael Ho
Gerrit-Reviewer: Michael Ho <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-HasComments: Yes

View raw message