David Ribeiro Alves has posted comments on this change.

Change subject: Add a macro to LOG and return on a non-OK status
......................................................................


Patch Set 2:

(5 comments)

http://gerrit.cloudera.org:8080/#/c/4927/2//COMMIT_MSG
Commit Message:

> Nit: if possible, please keep the commit message line length under 72 chara
ah, neat. didn't know that one. did it for the most part, but didn't wrap code 
examples


PS2, Line 22: beggining
> nit: typo, should have been beginning
Done


http://gerrit.cloudera.org:8080/#/c/4927/2/src/kudu/util/status.h
File src/kudu/util/status.h:

PS2, Line 65: and
> nit: log it as 'msg' at 'level' and return the status
Done


PS2, Line 66: KUDU_RETURN_NOT_OK_LOG
> May be, name it KUDU_LOG_AND_RETURN_MSG() since it's very similar to KUDU_L
That one reads slightly weird to me as it seems that it returns the message and 
not the status. Notice that KUDU_LOG_AND_RETURN returns on any status not just 
not ok and that this one additionally takes 'msg' which makes it hard to reuse 
the macro.

I first thought of LOG_RETURN_NOT_OK() but this one also seems to hint that we 
log all the time so the current one was the best that I could think of. Finally 
I didn't want to include ERROR (like LOG_ERROR_RETURN_NOT_OK) since the user 
might confuse ERROR with the passed 'level'.


PS2, Line 69: msg
> since it's a macro parameter, it's better to enclose it into parenthesis.
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibb906e7240d7a289a7822444bc9cbf748a555efb
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves <dral...@apache.org>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <dral...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-HasComments: Yes

Reply via email to