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

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


Patch Set 7: Code-Review+2

(4 comments)

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

http://gerrit.cloudera.org:8080/#/c/12825/7/src/kudu/util/ttl_cache.h@46
PS7, Line 46: with FIFO eviction policy
Nit: you can drop this part; the rest of the sentence mentions that eviction is 
done using FIFO.


http://gerrit.cloudera.org:8080/#/c/12825/7/src/kudu/util/ttl_cache.h@50
PS7, Line 50: evicting
Nit: "to evicting"


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

http://gerrit.cloudera.org:8080/#/c/12825/6/src/kudu/util/ttl_cache.h@47
PS6, Line 47: ach: the earliest
            : // added entry is evicted first. Since the TTL setting is static 
and applies
            : // to every entry in the cache, the FI
> As I understand this question that is not specific to the TTLCache, but it'
Probably not worth it, though we may want to think about how to protect 
ourselves in the event that Sentry sends us a massive response.


http://gerrit.cloudera.org:8080/#/c/12825/6/src/kudu/util/ttl_cache.h@76
PS6, Line 76:       handle_ = std::move(other.handle_);
> Maybe I'm missing something here, but what if the instance was created with
Ah, right, you want to propagate a nullptr to other.ptr_. Maybe this would be 
clearer?

  ptr_ = other.ptr_;
  other.ptr_ = nullptr;

Anyway it's not a big deal; the current code is fine too.



--
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: 7
Gerrit-Owner: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@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: Thu, 28 Mar 2019 22:15:13 +0000
Gerrit-HasComments: Yes

Reply via email to