Tim Armstrong has posted comments on this change.

Change subject: IMPALA-5389: simplify BufferDescriptor lifetime
......................................................................


Patch Set 1:

(8 comments)

http://gerrit.cloudera.org:8080/#/c/7182/1//COMMIT_MSG
Commit Message:

PS1, Line 11: test.
> test?
Done


PS1, Line 18: was did not
> did not
Done


http://gerrit.cloudera.org:8080/#/c/7182/1/be/src/runtime/disk-io-mgr-scan-range.cc
File be/src/runtime/disk-io-mgr-scan-range.cc:

Line 85:   *buffer = nullptr;
> maybe prefer buffer->reset() here (for me it's clearer not to use the overl
Oops missed this, it just worked by coincidence. I changed it to a DCHECK, 
since there's no way passing in a buffer makes sense.


http://gerrit.cloudera.org:8080/#/c/7182/1/be/src/runtime/disk-io-mgr.cc
File be/src/runtime/disk-io-mgr.cc:

PS1, Line 208: len_(0),
             :     eosr_(false),
             :     scan_range_offset_(0
> we've been moving towards initializing members with constants in the header
Done


PS1, Line 700: unique_ptr<BufferDescriptor>
> make_unique(this, reader, range, buffer, buffer_size, reader->mem_tracker_)
It unfortunately doesn't work because the constructor is not accessible to 
make_unique() (this appears to be a known problem with make_unique()).


PS1, Line 710: std
> remove std::?
Done


http://gerrit.cloudera.org:8080/#/c/7182/1/be/src/runtime/disk-io-mgr.h
File be/src/runtime/disk-io-mgr.h:

PS1, Line 150: recycling of the buffer descriptor
> Since we no longer reuse the buffer descriptor, I think this comment should
Done


http://gerrit.cloudera.org:8080/#/c/7182/1/be/src/runtime/row-batch.h
File be/src/runtime/row-batch.h:

PS1, Line 217: std::unique_ptr<DiskIoMgr::BufferDescriptor>&& buffer
> Right, since you can't pass a unique_ptr<> except by moving it, I think pas
Changed it for consistency - I don't see any instances of unique_ptr<>&& in the 
codebase.

Yeah the advantage of passing by value is that it means that the callee always 
has to take ownership. For unique_ptr copying the pointer doesn't really matter 
(with the rvalue ref we're really passing in a pointer to a pointer).


-- 
To view, visit http://gerrit.cloudera.org:8080/7182
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I007d098e9a1abb1f684be37b7f1ee6c03d3879b2
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <[email protected]>
Gerrit-Reviewer: Henry Robinson <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-HasComments: Yes

Reply via email to