Joe McDonnell has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/21122 )
Change subject: IMPALA-12883: Support updating the charge on an entry in the cache ...................................................................... IMPALA-12883: Support updating the charge on 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's 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 tune its behavior to avoid generating entries that would exceed the maximum charge. Testing: - Added tests cases to the caching backend tests Change-Id: I34f54fb3a91a77821651c25d8d3bc3a2a3945025 Reviewed-on: http://gerrit.cloudera.org:8080/21122 Reviewed-by: Michael Smith <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> Reviewed-by: Yida Wu <[email protected]> --- 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, 514 insertions(+), 91 deletions(-) Approvals: Michael Smith: Looks good to me, but someone else must approve Impala Public Jenkins: Verified Yida Wu: Looks good to me, approved -- 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: merged Gerrit-Change-Id: I34f54fb3a91a77821651c25d8d3bc3a2a3945025 Gerrit-Change-Number: 21122 Gerrit-PatchSet: 8 Gerrit-Owner: Joe McDonnell <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Kurt Deschler <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Yida Wu <[email protected]>
