Andrew Wong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/13196 )

Change subject: [util] interface to invalidate cache entries
......................................................................


Patch Set 2:

(5 comments)

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

http://gerrit.cloudera.org:8080/#/c/13196/2/src/kudu/util/cache.h@243
PS2, Line 243: from the oldest (less relevant) entries to the newest (more 
relevant) ones.
Does the order depend on the kind of recency list it is?


http://gerrit.cloudera.org:8080/#/c/13196/2/src/kudu/util/cache.h@265
PS2, Line 265: Ivalidate
Invalidate


http://gerrit.cloudera.org:8080/#/c/13196/2/src/kudu/util/cache.h@266
PS2, Line 266: For example, in case of
             :   // multi-shard cache, when the 'iteration_func' returns 
'false',
             :   // the invalidation at current shard stops and switches to the 
next
             :   // non-yet-processed shard, if any is present.
> Yeah but these examples don't reflect real use cases in Kudu yet, nor are s
I agree, I wasn't sure what the motivation behind these functions were, given 
that they aren't really used in very meaningful way today.


http://gerrit.cloudera.org:8080/#/c/13196/2/src/kudu/util/cache.h@304
PS2, Line 304: to for
nit: for

same below


http://gerrit.cloudera.org:8080/#/c/13196/2/src/kudu/util/cache.cc
File src/kudu/util/cache.cc:

http://gerrit.cloudera.org:8080/#/c/13196/2/src/kudu/util/cache.cc@63
PS2, Line 63: const Cache::ValidityFunc Cache::kInvalidateAllEntriesFunc = [](
            :     Slice /* key */, Slice /* value */) {
            :   return false;
            : };
            :
            : const Cache::IterationFunc Cache::kIterateOverAllEntriesFunc = [](
            :     size_t /* valid_entries_num */, size_t /* valid_entries_num 
*/) {
            :   return true;
            : };
These seem more expressive than they need to be for the purpose of invalidating 
all non-valid entries. Do you have something in the works that makes use of 
these parameters?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1e340c3270b5580114151cdd40afe82576c18099
Gerrit-Change-Number: 13196
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: Tidy Bot (241)
Gerrit-Comment-Date: Wed, 01 May 2019 19:25:04 +0000
Gerrit-HasComments: Yes

Reply via email to