Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/13069 )
Change subject: [authz] new SentryAuthzProvider's caching strategy ...................................................................... Patch Set 7: (2 comments) http://gerrit.cloudera.org:8080/#/c/13069/6/src/kudu/master/sentry_privileges_fetcher.h File src/kudu/master/sentry_privileges_fetcher.h: http://gerrit.cloudera.org:8080/#/c/13069/6/src/kudu/master/sentry_privileges_fetcher.h@126 PS6, Line 126: : // Add/merge privileges from other instance of SentryPrivilegesBranch. : void Merge(const SentryPrivilegesBranch& other); : : // Output the privileges into branches corresponding to DB-and-higher and : // TABLE-and-lower authz scopes. : void Split(SentryPrivilegesBranch* other_scope_db, : SentryPrivilegesBranch* other_scope_table) const; > Yep, I thought about that already. Ah, I missed that in both cases we're operating on cached objects. Agreed that it doesn't make sense. http://gerrit.cloudera.org:8080/#/c/13069/6/src/kudu/master/sentry_privileges_fetcher.cc File src/kudu/master/sentry_privileges_fetcher.cc: http://gerrit.cloudera.org:8080/#/c/13069/6/src/kudu/master/sentry_privileges_fetcher.cc@422 PS6, Line 422: switch (e.scope) { > I might be missing something here: I'm not sure that's what we want here: e Mike and I talked about emplace_back (without std::move) vs. push_back in another code review: https://gerrit.cloudera.org/c/12205/3/src/kudu/common/generic_iterators.cc#441 tl;dr: it's easier to remember to always use emplace_back than to know to use push_back when copying and emplace_back when moving. Mike also wrote a microbenchmark that showed that emplace_back was faster. -- To view, visit http://gerrit.cloudera.org:8080/13069 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id96181345e357a104e28314d8d8d88633dcf9608 Gerrit-Change-Number: 13069 Gerrit-PatchSet: 7 Gerrit-Owner: Alexey Serbin <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Hao Hao <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Comment-Date: Wed, 24 Apr 2019 03:37:34 +0000 Gerrit-HasComments: Yes
