mikemccand commented on a change in pull request #542:
URL: https://github.com/apache/lucene/pull/542#discussion_r773127081



##########
File path: lucene/core/src/test/org/apache/lucene/search/TestLRUQueryCache.java
##########
@@ -564,10 +564,9 @@ public void testCachingAccountableQuery() throws 
IOException {
       final Query query = new AccountableDummyQuery();
       searcher.count(query);
     }
-    long queryRamBytesUsed =
-        numQueries * (10 * QUERY_DEFAULT_RAM_BYTES_USED + 
LINKED_HASHTABLE_RAM_BYTES_PER_ENTRY);
-    // allow 10% error for other ram bytes used estimation inside query cache
-    assertEquals(queryRamBytesUsed, queryCache.ramBytesUsed(), 10 * 
queryRamBytesUsed / 100);
+    long queryRamBytesUsed = numQueries * (10 * QUERY_DEFAULT_RAM_BYTES_USED);

Review comment:
       Ahh OK because we are using a "dummy" query, which says it uses `10 * 
DEFAULT` bytes used, then we know the query cache overall must use this much 
RAM (times `numQueries`).  Good!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to