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

Change subject: WIP [util] introduce TTL cache
......................................................................


Patch Set 2:

(6 comments)

http://gerrit.cloudera.org:8080/#/c/12825/2/src/kudu/util/ttl_cache-test.cc
File src/kudu/util/ttl_cache-test.cc:

http://gerrit.cloudera.org:8080/#/c/12825/2/src/kudu/util/ttl_cache-test.cc@35
PS2, Line 35: using std::shared_ptr;
> warning: using decl 'shared_ptr' is unused [misc-unused-using-decls]
Done


http://gerrit.cloudera.org:8080/#/c/12825/2/src/kudu/util/ttl_cache.h
File src/kudu/util/ttl_cache.h:

http://gerrit.cloudera.org:8080/#/c/12825/2/src/kudu/util/ttl_cache.h@41
PS2, Line 41: entiries
> nit: entries
Done


http://gerrit.cloudera.org:8080/#/c/12825/2/src/kudu/util/ttl_cache.h@42
PS2, Line 42: do
> nit: does
Done


http://gerrit.cloudera.org:8080/#/c/12825/2/src/kudu/util/ttl_cache.h@63
PS2, Line 63:     V& value() const {
            :       DCHECK(ptr_);
            :       return *ptr_;
            :     }
> Is this used anywhere right now?
Yes, after a few iterations on authz provider that's now used in 
sentry_authz_provider.


http://gerrit.cloudera.org:8080/#/c/12825/2/src/kudu/util/ttl_cache.h@109
PS2, Line 109: // If the item has expired already, return null handle. The 
underlying
             :       // cache will purge the expired entry when necessary upon 
accommodating
             :       // new entries being added into the cache, if any.
> Curious what the line of thought behind this is -- it seems innocuous enoug
The way how the TTL cache is used assumes the client will fetch and put a new 
entry once it's detected an entry is expired.  At least for the current use 
case in Sentry authz provider that's the case.


http://gerrit.cloudera.org:8080/#/c/12825/2/src/kudu/util/ttl_cache.h@128
PS2, Line 128: size_t charge
> Perhaps it's worth having a default of kAutomaticCharge?
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic8aa0ebe6b26bf34ca0e02bebbdb6a94f6b00621
Gerrit-Change-Number: 12825
Gerrit-PatchSet: 2
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-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Mon, 25 Mar 2019 19:45:12 +0000
Gerrit-HasComments: Yes

Reply via email to