cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Stupp (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-12453) AutoSavingCache does not store required keys making RowCacheTests Flaky
Date Sat, 31 Dec 2016 13:20:58 GMT


Robert Stupp commented on CASSANDRA-12453:

Yes, that's related to the number of segments.
I think the easiest way to make the test consistent is to force OHC to use 16 segments. Adding
the line
        System.setProperty("org.caffinitas.ohc.segmentCount", "16");
as the first statement in {{RowCacheTest.defineSchema()}} seems to solve the issue. Replacing
16 with 64 makes the utest fail. I think that makes the utest consistent. WDYT about this

> AutoSavingCache does not store required keys making RowCacheTests Flaky
> -----------------------------------------------------------------------
>                 Key: CASSANDRA-12453
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: sankalp kohli
>            Assignee: Jay Zhuang
>            Priority: Minor
>             Fix For: 2.2.x, 3.0.x
>         Attachments: 12453-2.2.txt
> 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
>      * </p>
>      */
>     CloseableIterator<K> hotKeyIterator(int n);

This message was sent by Atlassian JIRA

View raw message