Todd Lipcon has posted comments on this change.

Change subject: Add ComputeIfAbsent methods to map-util
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/3593/5/src/kudu/gutil/map-util.h
File src/kudu/gutil/map-util.h:

Line 793: ComputeIfAbsentReturnAbsense(MapContainer* container,
> OK, code style is code style, whether it's ugly or not.
I think we usually don't bother to check for NULL here because it's a misuse of 
the API. If anything we might do a DCHECK, which would result in a slightly 
nicer crash message. However, a CHECK causes a fatal just like a dereferencing 
of a NULL pointer, so either way we get a core dump and a fairly obvious crash 
when we look at it in gdb. Plus, since we run all the tests under ASAN/UBSAN, 
we'll even get a nice message and stack trace about accessing a NULL pointer


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iba9fa8038e699e66d34ce541cd02c77f46691315
Gerrit-PatchSet: 5
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