paulirwin commented on code in PR #1138:
URL: https://github.com/apache/lucenenet/pull/1138#discussion_r1989345716
##########
src/Lucene.Net/Store/MMapDirectory.cs:
##########
@@ -314,7 +314,7 @@ internal virtual ByteBuffer[] Map(MMapIndexInput input,
FileStream fc, long offs
input.memoryMappedFile = MemoryMappedFile.CreateFromFile(
fileStream: fc,
mapName: null,
- capacity: length,
+ capacity: fc.Length, // use the full length of the file
Review Comment:
Good finds! Can you point me to how RAMDirectory is related to this test,
though? AFAICT it randomly gets one of the FS_DIRECTORIES instances which is
SimpleFSDirectory, NIOFSDirectory, or MMapDirectory... not RAMDirectory. I'm
not quite following how that is connected to this failure (although I
understand how having Read access could mean the lock is never considered held).
--
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]