impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Hecht (Code Review)" <>
Subject [Impala-CR](cdh5-trunk) IMPALA-3611: track unused Disk IO buffer memory
Date Thu, 21 Jul 2016 05:08:05 GMT
Dan Hecht has posted comments on this change.

Change subject: IMPALA-3611: track unused Disk IO buffer memory

Patch Set 9:

File be/src/runtime/

Line 246:   mem_tracker_->Release(buffer_len_);
it's a bit confusing that the tracking happens both in BufferDescriptor methods (here) and
also directly in DiskIoMgr methods. maybe there's no great way to factor the code to keep
the accounting all in once class though.

PS9, Line 368: Untracked
this is a little misleading given that they are tracked by this tracker.  Why not just make
a mem tracker for buffered block manager, and then nothing has to change in this code when
the buffered block manager is deleted?  is there something that made that tough?

PS9, Line 650: Not a cached buffer. Return the io buffer.
not your comment, but this comment is pretty useless, it just restates what the C++ code says.
 it'd be better to explain why cached buffers are not returned.

Line 752:       delete[] buffer;
would be nice to delete first then Release().
File be/src/runtime/disk-io-mgr.h:

PS9, Line 242: caller should check the memory limit
do callers actually check the mem limit?
or are they assuming that the mem limit is okay because the src and dst mem trackers are within
the same hierarchy and dst itself doesn't have a limit?

PS9, Line 271: Non-NULL for non-cached
double negative is hard to parse. maybe say "Can be NULL only for cached"

PS9, Line 774: associated
what does this mean? does this routine consume memory from 'mem_tracker', or does this mean
something else?

Line 792:   /// max_buffer_size_.
would be good to comment on how mem tracking is affected.

Line 802:   /// Returns the buffer in 'desc' (cannot be NULL), and sets desc->buffer_ to
from the comments alone it's not clear what the difference between ReturnBuffer() and ReturnFreeBuffer()

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I8777cf76f04d34a46f53d53005412e0f1d63b5b7
Gerrit-PatchSet: 9
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Tim Armstrong <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Michael Ho
Gerrit-Reviewer: Michael Ho <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-HasComments: Yes

View raw message