Hao Hao has posted comments on this change.

Change subject: Combine redaction flag for log and flags into one.
......................................................................


Patch Set 3:

(9 comments)

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

Line 112: DEFINE_string(redact, "log,flag",
> Please use a gflag validator (google::RegisterFlagValidator) to validate th
Done


Line 113:               "Sensitive information that needs to be redacted 
(comma-separated "
> How about: "Comma-separated list of redactions. Supported redactions are 'f
Done


PS3, Line 115: flags tagged as 'sensitive'will
> this is somewhat uninterpretable to users, since they don't really know abo
Done


Line 118:               "redacted.");
> can we also add an "all" or "*" mode?
Done


PS3, Line 275: redactLog
> style: REDACT_LOG or kRedactLog or something
Done


Line 488: bool ShouldRedact(const string& redactionType) {
> Can't we just strstr(FLAGS_redact, "flag")?
Done


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

Line 68: bool ShouldRedact(const std::string&);
> Nit: missing parameter name.
Done


PS3, Line 70: // 'log' redaction type.
            : extern const char* const redactLog;
            : 
            : // 'flag' redaction type.
            : extern const char* const redactFlag;
> For callers outside flags.{cc,h} I think it'd be nicer to provide an enum f
Done


http://gerrit.cloudera.org:8080/#/c/6112/3/src/kudu/util/logging.h
File src/kudu/util/logging.h:

Line 62: #define KUDU_SHOULD_REDACT() (kudu::ShouldRedact(kudu::redactLog) && 
kudu::tls_redact_user_data)
> this is a hot path, I think we should be more performance-conscious, and ex
Can you specify a bit more on how to do that? How would the boolean flag be 
notified of the value of redaction flag is changed?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia49ae439824351df6c87291b0828173c69ab31b0
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Hao Hao <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Hao Hao <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-HasComments: Yes

Reply via email to