You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "sankalp kohli (JIRA)" <ji...@apache.org> on 2016/08/12 18:32:20 UTC

[jira] [Commented] (CASSANDRA-12453) AutoSavingCache does not store required keys making RowCacheTests Flaky

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

sankalp kohli commented on CASSANDRA-12453:
-------------------------------------------

[~jkni]  One of the ways I have fixed this internally is to pass a boolean from test to not use hotKeyIterator. However this test shows a minor bug. Not sure how we can fix the actual issue. What do you think? 

> AutoSavingCache does not store required keys making RowCacheTests Flaky
> -----------------------------------------------------------------------
>
>                 Key: CASSANDRA-12453
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12453
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: sankalp kohli
>            Priority: Minor
>
> RowCacheTests were flaky and while investigating, I found that it does not store all the keys to disk. 
> The reason is that we use  OHCache and call hotKeyIterator on it. This is not guaranteed to return the number of keys we want. Here is the documentation from OHCache 
> /**
>      * Builds an iterator over the N most recently used keys returning deserialized objects.
>      * You must call {@code close()} on the returned iterator.
>      * <p>
>      *     Note: During a rehash, the implementation might return keys twice or not at all.
>      * </p>
>      */
>     CloseableIterator<K> hotKeyIterator(int n);



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)