Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid negative memory result in IndicesQueryCache stats calculation #6917

Merged
merged 3 commits into from
Apr 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cache stores recent queries so isn't empty even with no doc id sets
Signed-off-by: Daniel Widdis <widdis@gmail.com>
  • Loading branch information
dbwiddis committed Apr 1, 2023
commit 4e14768211e76bc7bd5e9a708abb13ec5c4d0bc1
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public void testBasics() throws IOException {
assertEquals(0L, stats.getCacheCount());
assertEquals(0L, stats.getHitCount());
assertEquals(0L, stats.getMissCount());
assertEquals(0L, stats.getMemorySizeInBytes());
assertTrue(stats.getMemorySizeInBytes() >= 0L);

cache.close(); // this triggers some assertions
}
Expand Down