Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/12833 )
Change subject: WIP [master] introduced SentryAuthzCache ...................................................................... Patch Set 4: (6 comments) Haven't reviewed yet, just flipping through. http://gerrit.cloudera.org:8080/#/c/12833/4/src/kudu/master/sentry_authz_provider.cc File src/kudu/master/sentry_authz_provider.cc: http://gerrit.cloudera.org:8080/#/c/12833/4/src/kudu/master/sentry_authz_provider.cc@111 PS4, Line 111: DEFINE_uint32(sentry_authz_cache_capacity_bytes, 256 * 1024 * 1024, How did you arrive at this default value? http://gerrit.cloudera.org:8080/#/c/12833/4/src/kudu/master/sentry_authz_provider.cc@116 PS4, Line 116: TAG_FLAG(sentry_authz_cache_capacity_bytes, experimental); Of the new flags, this one doesn't necessarily seem experimental. http://gerrit.cloudera.org:8080/#/c/12833/4/src/kudu/master/sentry_authz_provider.cc@331 PS4, Line 331: vector<string> AuthzInfoKey::GenerateKeySequence( Would be more efficient to break this out into the N possible cases and do a single strings::Substitute or equivalent for each. gutils' StrCat or StrAppend may also be useful here. http://gerrit.cloudera.org:8080/#/c/12833/4/src/kudu/master/sentry_authz_provider.cc@369 PS4, Line 369: size_t res = sizeof(TListSentryPrivilegesResponse); Instead of this, pass in the pointer itself and call kudu_malloc_usable_size() on it. http://gerrit.cloudera.org:8080/#/c/12833/4/src/kudu/master/sentry_authz_provider.cc@530 PS4, Line 530: unique_ptr<TListSentryPrivilegesResponse> res_ptr; Could you allocate an empty TListSentryPrivilegesResponse here, and use it for SendRequestToSentry and memory_footprint? http://gerrit.cloudera.org:8080/#/c/12833/4/src/kudu/master/sentry_authz_provider.cc@582 PS4, Line 582: if (cache_capacity_bytes > 0) { Seems like you want to call cache_.reset() either way if the goal is to accommodate a change to FLAGS_sentry_authz_cache_capacity_bytes, no? If not, ignore this. -- To view, visit http://gerrit.cloudera.org:8080/12833 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Idaefacd50736f1f152dae34e76778e17b2e84cbe Gerrit-Change-Number: 12833 Gerrit-PatchSet: 4 Gerrit-Owner: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Hao Hao <hao....@cloudera.com> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Comment-Date: Mon, 25 Mar 2019 23:14:32 +0000 Gerrit-HasComments: Yes