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

dalongliu commented on FLINK-28989:
-----------------------------------

Currently, only jdbc and hbase connectors implement the partial caching, so 
I've tested the jdbc cache through the standalone cluster. The test cases are 
as follows:
 # Set `lookup.partial-cache.expire-after-write = 10000s`, I found the hitCount 
metrics will +2 each time hit the cache. The phenomenon was not as expected.
 # Set `lookup.partial-cache.expire-after-write = 10s`,  after 10 expired, the 
numCachedRecord metrics didn't decrease to 0 right away,  the metrics decreased 
only after some new record arrived, so this may be confuse the user. In 
addition, even if one record had been loaded into the cache, after it expired, 
if the same join key record arrived again, the hitCount and missCount metrics 
increase simultaneously, I think only one of them should increase.

!image-2022-09-05-12-26-22-263.png!

 

 

!image-2022-09-05-12-27-23-259.png!

As summary, I found here exists two main problems: the first is the guava cache 
expiration mechanism, guava doesn't expire the cache data actively, it needs a 
data trigger, so the numCacheRecords metrics is not corrected; the second is  
hitCount and missCount metrics increase simultaneously even if hit the cache.

> Release Testing: Verify FLIP-221 lookup table cache
> ---------------------------------------------------
>
>                 Key: FLINK-28989
>                 URL: https://issues.apache.org/jira/browse/FLINK-28989
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / Runtime
>    Affects Versions: 1.16.0
>            Reporter: Qingsheng Ren
>            Assignee: dalongliu
>            Priority: Blocker
>              Labels: release-testing
>             Fix For: 1.16.0
>
>         Attachments: image-2022-09-05-12-26-22-263.png, 
> image-2022-09-05-12-26-51-427.png, image-2022-09-05-12-27-23-259.png
>
>
> The functionality of lookup table cache introduced in the FLIP-221 should be 
> validated, including:
> - Partial caching, which has been integrated by JDBC and HBase lookup table
> - Full caching, only supported by test values lookup table



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

Reply via email to