Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-12453

AutoSavingCache does not store required keys making RowCacheTests Flaky

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 2.2.9, 3.0.11, 3.10
    • Legacy/Core
    • None
    • Low

    Description

      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);

      Attachments

        1. 12453-2.2.txt
          2 kB
          Jay Zhuang
        2. 12453-2.2-update.diff
          0.9 kB
          Jay Zhuang

        Activity

          People

            jay.zhuang Jay Zhuang
            kohlisankalp Sankalp Kohli
            Jay Zhuang
            Robert Stupp
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: