impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Behm (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-5881: Use native allocation while building catalog updates
Date Thu, 07 Sep 2017 16:10:29 GMT
Alex Behm has posted comments on this change.

Change subject: IMPALA-5881: Use native allocation while building catalog updates

Patch Set 8:

File be/src/catalog/

Line 116:   DCHECK(len < std::numeric_limits<uint32_t>::max());

#include <limit>

Line 170:     LOG(ERROR) << "Failed to free buffers. Potential memory leak of: "
Failed to free native buffer through JNI. Leaked N bytes.

(We definitely leaked at this point).

Also include the status error message.
File fe/src/main/java/org/apache/impala/service/

Line 295:       TException {
Does this really throw TException?
File fe/src/main/java/org/apache/impala/thrift/

Line 94:   private void tryAllocate(long len, boolean reAllocate) {
Can we simplify this to just always use reallocateMemory()? Realloc from a 0 ptr should be
ok I think.

Line 95:     try {
Preconditions.checkState(bufferPtr_ >= 0);

for clarity why the free in L114 is always ok

Line 113:     } catch (Exception e) {
catch Throwable for extra paranoia

Line 139:         if (newBufferSize >= BUFFER_MAX_SIZE_LIMIT) {
|| newBufferSize < 0 (overflow)

Line 155:   public synchronized void reset() {}
What's this for? Is it an @Override?

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I383684effa9524734ce3c6c0fb7ed37de0e15782
Gerrit-PatchSet: 8
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Bharath Vissapragada <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Bharath Vissapragada <>
Gerrit-Reviewer: Dimitris Tsirogiannis <>
Gerrit-Reviewer: Mostafa Mokhtar <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-HasComments: Yes

View raw message