uschindler commented on PR #13907: URL: https://github.com/apache/lucene/pull/13907#issuecomment-2413496158
> If we want to not call `madvise` when the advice is `NORMAL`, then the compound file should be open with NORMAL so that we can also skip the `madvise` call on the inner file when the advice is `NORMAL`? Of course, we should not do this. The compound outer IndexInput should be opened with "NORMAL" read advice (which is a NOOP) and for the sub-files we use an individual one. I was just stumbling on the javadocs that its not "legal": https://github.com/apache/lucene/pull/13907/files#diff-0ac049bc7bd12b9665b6b3e7605bc8029e6623a98aa300ab52df7a8e9fe302d9R130-R131 > (Merging is a bit different, as we may be reading the segment a few times for search operations before we use it for merging, so it would make sense to change the advice over time.) People already experimented with something like this, although their hacky patch doe snot fit the current API. My plan would be to allow to change the read advice to "SEQUENTIAL" or "NORMAL" before the merging starts and revert back at end. As this affects all clones, it must be restored at end. We can make a separate PR of this. Uwe -- 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-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org