Joe McDonnell has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/21122


Change subject: IMPALA-12883: Support updating the charge an entry in the cache
......................................................................

IMPALA-12883: Support updating the charge an entry in the cache

The cache implementation currently assumes that a cache
entry's charge will remain constant over time and does
not support updating the charge. This works well for
existing cache users like the data cache and codegen
cache. However, it doesn't work as well for use cases
where the final size is not known up front. Being able
to update the charge also allows for avoiding
concurrency issues where two different threads are
trying to insert the same entry.

This adds the ability to update an entry charge after
it has been inserted into the cache. This can trigger
evictions if the size increases. This also adds a way
to retrieve the maximum charge supported by the cache.
This allows a cache user to modify its behavior as it
is approaching the maximum charge.

Testing:
 - Added tests cases to the caching backend tests

Change-Id: I34f54fb3a91a77821651c25d8d3bc3a2a3945025
---
M be/src/util/cache/cache-internal.h
M be/src/util/cache/cache-test.cc
M be/src/util/cache/cache-test.h
M be/src/util/cache/cache.h
M be/src/util/cache/lirs-cache-test.cc
M be/src/util/cache/lirs-cache.cc
M be/src/util/cache/rl-cache-test.cc
M be/src/util/cache/rl-cache.cc
8 files changed, 325 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/22/21122/1
--
To view, visit http://gerrit.cloudera.org:8080/21122
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I34f54fb3a91a77821651c25d8d3bc3a2a3945025
Gerrit-Change-Number: 21122
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>

Reply via email to