michaeljmarshall commented on PR #16145:
URL: https://github.com/apache/lucene/pull/16145#issuecomment-6067967599

   My initial goal with the bit mixing and counting local clone calls to 
prefetch was to spread out the calls. Then, @goankur suggested that wasn't 
ideal in the first case:
   
   > 1. `shouldProbe(prefetchCount++)` uses a counter per clone that starts at 
0, and `BitMixer.mix(0) == 0`. `SegmentTermsEnum` clones `termsIn` for each 
lookup, so every term lookup in every segment probes.
   
   I agree though that the usage of `ThreadLocalRandom` is inappropriate here. 
I just pushed up a solution that uses the clone-local counter but also takes an 
initial seed from the `PrefetchBackoff` in such a way that we ensure short 
lived clones that call < 64 prefetches still eventually trigger the 
`shouldProbe` logic.


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