javanna commented on code in PR #13606:
URL: https://github.com/apache/lucene/pull/13606#discussion_r1757003986
##########
lucene/core/src/java/org/apache/lucene/search/HitsThresholdChecker.java:
##########
@@ -24,6 +24,10 @@ abstract class HitsThresholdChecker {
/** Implementation of HitsThresholdChecker which allows global hit counting
*/
private static class GlobalHitsThresholdChecker extends HitsThresholdChecker
{
private final LongAdder globalHitCount = new LongAdder();
+ // Cache whether the threshold has been reached already. It is not
volatile or synchronized on
+ // purpose to contain the overhead of reading the value similarly to what
String#hashCode()
+ // does. This does not affect correctness.
+ private boolean thresholdReached = false;
Review Comment:
sounds good, thanks for clarifying
--
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]