You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/10/13 14:53:59 UTC
[GitHub] [lucene] rmuir opened a new issue, #11848: Fix ExitableDirectoryReader sampling constants to be power-of-2
rmuir opened a new issue, #11848:
URL: https://github.com/apache/lucene/issues/11848
### Description
When looking at #11843, I noticed code of the following in several places in ExitableDirectoryReader:
```
if (calls++ % MAX_CALLS_XXX== 0) {
checkAndThrow();
}
```
Unfortunately these `MAX_CALLS_XXX` constants are not powers of 2: we should avoid integer division.
--
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: issues-unsubscribe@lucene.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
[GitHub] [lucene] rmuir closed issue #11848: Fix ExitableDirectoryReader sampling constants to be power-of-2
Posted by GitBox <gi...@apache.org>.
rmuir closed issue #11848: Fix ExitableDirectoryReader sampling constants to be power-of-2
URL: https://github.com/apache/lucene/issues/11848
--
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: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org