Alex Behm has posted comments on this change.

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


Patch Set 8:

(8 comments)

http://gerrit.cloudera.org:8080/#/c/7955/8/be/src/catalog/catalog.cc
File be/src/catalog/catalog.cc:

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


#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.


http://gerrit.cloudera.org:8080/#/c/7955/8/fe/src/main/java/org/apache/impala/service/JniCatalog.java
File fe/src/main/java/org/apache/impala/service/JniCatalog.java:

Line 295:       TException {
Does this really throw TException?


http://gerrit.cloudera.org:8080/#/c/7955/8/fe/src/main/java/org/apache/impala/thrift/NativeByteArrayOutputStream.java
File fe/src/main/java/org/apache/impala/thrift/NativeByteArrayOutputStream.java:

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 http://gerrit.cloudera.org:8080/7955
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I383684effa9524734ce3c6c0fb7ed37de0e15782
Gerrit-PatchSet: 8
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Bharath Vissapragada <bhara...@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bhara...@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dtsirogian...@cloudera.com>
Gerrit-Reviewer: Mostafa Mokhtar <mmokh...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>
Gerrit-HasComments: Yes

Reply via email to