[ 
https://issues.apache.org/jira/browse/IMPALA-12883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17828454#comment-17828454
 ] 

ASF subversion and git services commented on IMPALA-12883:
----------------------------------------------------------

Commit 2f7116173071082ea9cb28512894dc1fa537e9fe in impala's branch 
refs/heads/master from Michael Smith
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=2f7116173 ]

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 <michael.sm...@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Reviewed-by: Yida Wu <wydbaggio...@gmail.com>


> Add support for changing the charge for a cache entry
> -----------------------------------------------------
>
>                 Key: IMPALA-12883
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12883
>             Project: IMPALA
>          Issue Type: Task
>          Components: Backend
>    Affects Versions: Impala 4.4.0
>            Reporter: Joe McDonnell
>            Priority: Major
>
> The Cache implementation in be/src/util/cache currently does not support 
> modifying the charge of a cache entry after it has been created. For cases 
> where the size is known up front, this is fine. For example, the data cache 
> knows the number of bytes it will consume before it creates the cache entry.
> This is a problem for caches that may not know the size of an entry up front. 
> For example, the tuple cache may want to create a cache entry immediately to 
> avoid concurrency issues, but then it would want to update that entry's 
> charge as the entry is finalized (or reaches certain size increments).
> It would also be useful to expose the maximum charge allowed for a cache 
> entry. This would allow writers to avoid creating a cache entry that is too 
> large.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to