Todd Lipcon has posted comments on this change.

Change subject: KUDU-1696. Daemons should dump their version info to the INFO 
log at startup
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/4733/3/src/kudu/util/flags.cc
File src/kudu/util/flags.cc:

Line 370:       for (const auto& default_flag : default_flags) {
> I was thinking about this, but it's done only once at startup anyways and i
Well, we have 208 flags already, so hundreds of flags is already happening :)

In terms of the other factors, I'm actually less worried about the performance, 
and more just thinking the code would be easier to read with a map. If you use 
an unordered_map, it's O(1) access, and there isn't extra allocation if you use 
emplace(flag_name, std::move(flag_info)). You can avoid the repeated code by 
adding a 'GetFlagMap' function in this file.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I846827c53e74ca364af61c690bf85af8a8f28601
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Maxim Smyatkin <[email protected]>
Gerrit-Reviewer: Dinesh Bhat <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Maxim Smyatkin <[email protected]>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-HasComments: Yes

Reply via email to