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
on the returned iterator.
- Note: During a rehash, the implementation might return keys twice or not at all.
CloseableIterator<K> hotKeyIterator(int n);