Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/13196 )
Change subject: [util] interface to invalidate cache entries ...................................................................... [util] interface to invalidate cache entries Added a means to invalidate entries in Cache. Basically, it's a way to iterate over all entries in a cache while having an ability to remove an entry based on a set of criteria specified using an entry's key and value. The generic usage pattern of the introduced invalidation mechanism is to purge of entries matching criteria based on their keys and values. In particular, that's useful for periodic scrubbing tasks which get rid of expired entries in a TTLCache. It's about invalidating expired entries in a TTL cache even if the cache hasn't reached its capacity yet. The latter, being an optimization, allows for more effective usage of the OS memory in the presence of multiple concurrent processes. Added corresponding tests as well. Change-Id: I1e340c3270b5580114151cdd40afe82576c18099 Reviewed-on: http://gerrit.cloudera.org:8080/13196 Tested-by: Kudu Jenkins Reviewed-by: Adar Dembo <[email protected]> Reviewed-by: Andrew Wong <[email protected]> --- M src/kudu/util/cache-test.cc M src/kudu/util/cache.cc M src/kudu/util/cache.h M src/kudu/util/nvm_cache.cc M src/kudu/util/ttl_cache-test.cc M src/kudu/util/ttl_cache.h 6 files changed, 354 insertions(+), 4 deletions(-) Approvals: Kudu Jenkins: Verified Adar Dembo: Looks good to me, but someone else must approve Andrew Wong: Looks good to me, approved -- 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: merged Gerrit-Change-Id: I1e340c3270b5580114151cdd40afe82576c18099 Gerrit-Change-Number: 13196 Gerrit-PatchSet: 4 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: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241)
