s1monw commented on a change in pull request #758: LUCENE-8833: Add a #load()
method to IndexInput to allow preloading file content into physical memory
URL: https://github.com/apache/lucene-solr/pull/758#discussion_r299494507
##########
File path:
lucene/core/src/java/org/apache/lucene/store/ByteBufferIndexInput.java
##########
@@ -491,4 +492,14 @@ protected ByteBufferIndexInput buildSlice(String
sliceDescription, long ofs, lon
return super.buildSlice(sliceDescription, this.offset + ofs, length);
}
}
+
+ @Override
+ public boolean load() {
+ for (ByteBuffer buffer : buffers) {
+ if (buffer instanceof MappedByteBuffer) {
+ ((MappedByteBuffer) buffer).load();
Review comment:
good point I will look into this. I might need to think more about testing.
I am not happy with the status quo.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]