Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/24475 )

Change subject: KUDU-3785: Fix CLI flag validator failure
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/24475/4/src/kudu/tools/kudu-tool-test.cc
File src/kudu/tools/kudu-tool-test.cc:

http://gerrit.cloudera.org:8080/#/c/24475/4/src/kudu/tools/kudu-tool-test.cc@11160
PS4, Line 11160: Edge case:
> I see my earlier statement may seem confusing.
Why is it important to not use SetCommandLineOption(), but use an assignment 
via FLAGS_rpc_max_message_size instead?  UUIC, SetCommandLineOption() isn't 
different when setting the gflag's value via 'FLAGS_xxx = value'.  It works 
through the same global flag registry in libgflag.

Per gflag's source code (the extra part for set-modes is for 
SetCommandLineOptionWithMode()):

// SetCommandLineOption()                         
// SetCommandLineOptionWithMode()           
//    The programmatic way to set a flag's value, using a string
//    for its name rather than the variable itself (that is,
//    SetCommandLineOption("foo", x) rather than FLAGS_foo = x).
//    There's also a bit more flexibility here due to the various
//    set-modes, but typically these are used when you only have
//    that flag's name as a string, perhaps at runtime.                      
//    All of these work on the default, global registry.


If asking the author of this changelist to update the code, maybe it makes 
sense to provide an explanation why it's crucial to set the flag via 
FLAGS_rpc_max_message_size, but not via SetCommandLineOption().  It'd also 
think of reflecting that in the in-line comments.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idd24ec605bd14ce90ed8a5705230ff96d77d0d64
Gerrit-Change-Number: 24475
Gerrit-PatchSet: 4
Gerrit-Owner: Marton Greber <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Ashwani Raina <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Reviewer: Zoltan Chovan <[email protected]>
Gerrit-Comment-Date: Mon, 22 Jun 2026 19:13:56 +0000
Gerrit-HasComments: Yes

Reply via email to