Alexey Serbin has posted comments on this change.

Change subject: [util] minor clean-up on kudu::Subprocess
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/4502/1/src/kudu/util/subprocess.cc
File src/kudu/util/subprocess.cc:

PS1, Line 353: unique_ptr< DIR, std::function<void(DIR*)> >
> could also use MakeScopedCleanup here
ok, thank you for the suggestion.  Though, I think to keep unique_ptr, if there 
are no strong objections.


PS1, Line 353: unique_ptr< DIR, std::function<void(DIR*)> >
> Nit: remove the spaces separating the triangular brackets from other stuff 
Nope, the compiler could not do that because, as I understand, the signature of 
the constructor cannot override the explicitly specified template spec.   The 
shared_ptr has different signature, btw.


PS1, Line 445:   if (state_ != kRunning) {
             :     return Status::IllegalState("Sub-process is not running");
             :   }
> I don't know about this. My impression is that the intent here was to be sy
I think that calling abort() or using other ways to abruptly terminate a 
program is only for cases when it's not possible to handle an error 
consistently both for the caller and the callee.  Here we can report on a error 
related to the illegal state via return code without other side-effects.  Why 
not to do it that way?

I can add DCHECK() here if you think debug assert is needed.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idd058382e4519b323aebb4c992d9088496a341cc
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-HasComments: Yes

Reply via email to