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

Jason Dere commented on HIVE-18609:
-----------------------------------

Proposed changes:
- At query time, the validity of the cached result will be checked by comparing 
the transactional WriteIDs of the tables used in the cached query to the 
WriteIDs of the current query, similar to HIVE-19027. This approach only 
guarantees freshness if all of the tables used in the query are transactional 
tables. As a result, the results cache will be disabled by default for queries 
involving non-transactional tables.
- The above approach will only invalidate entries in the cache if that query 
looked up again, which could potentially leave a lot of undetected invalid 
entries in the cache taking up space which could cause other entries to be 
evicted. To remove these entries in a more timely fashion, have a background 
thread to periodically check the notification events for updates to the tables 
used in the results cache.


> Results cache invalidation based on table updates
> -------------------------------------------------
>
>                 Key: HIVE-18609
>                 URL: https://issues.apache.org/jira/browse/HIVE-18609
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Jason Dere
>            Priority: Major
>
> Look into using the materialized view invalidation mechanisms to 
> automatically invalidate queries in the results cache if the underlying 
> tables used in the cached queries have been modified.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to