impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bharath Vissapragada (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-5881: Use native allocation while building catalog updates
Date Thu, 07 Sep 2017 17:21:54 GMT
Bharath Vissapragada 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());

Line 170:     LOG(ERROR) << "Failed to free buffers. Potential memory leak of: "
> Failed to free native buffer through JNI. Leaked N bytes.
File fe/src/main/java/org/apache/impala/service/

Line 295:       TException {
> Does this really throw TException?
good catch, no!
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 
Good point, checked the JVM sources, it already includes the check to call malloc/realloc
depending on whether we pass 0.

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

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

Line 139:         if (newBufferSize >= BUFFER_MAX_SIZE_LIMIT) {
> || newBufferSize < 0 (overflow)
Don't think thats possible given we cap at BUFFER_MAX_SIZE_LIMIT which is <<< long_max.
I'm still including it to be on the safe side.

Line 155:   public synchronized void reset() {}
> What's this for? Is it an @Override?
Not an ovveride, removed, this was actually being called from serializer, but does nothing.

Ideally useful to reset the state of NBOAS, but given we don't allow calling serialize twice,
I don't think that is necessary.

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