paulirwin opened a new pull request, #1138: URL: https://github.com/apache/lucenenet/pull/1138
- [X] You've read the [Contributor Guide](https://github.com/apache/lucenenet/blob/main/CONTRIBUTING.md) and [Code of Conduct](https://www.apache.org/foundation/policies/conduct.html). - [X] You've included unit or integration tests for your change, where applicable. - [ ] You've included inline docs for your change, where applicable. - [X] There's an open issue for the PR that you are making. If you'd like to propose a change, please [open an issue](https://github.com/apache/lucenenet/issues/new/choose) to discuss the change or find an existing issue. Fixes a random failing test when the MMapDirectory's MemoryMappedFile capacity is out of range, plus some other related logic. Fixes #1090 ## Description See discussion on #1090. The solution I came up with is to pass 0 for the capacity, per the docs on that method: "Specify 0 to set the capacity to the size of the file on disk." This should avoid the problem where the provided capacity was smaller than the file size, likely due to a concurrency bug. This also fixes an "adjust" variable hack to allocate an empty buffer instead of subtracting 1 from the offset. -- 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: dev-unsubscr...@lucenenet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org