jpountz commented on PR #13907: URL: https://github.com/apache/lucene/pull/13907#issuecomment-2413484055
> The latter check is still there, so maybe we can clean this up, too. OK I'll do this. > why should the madvise only called when read advice is NORMAL 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`? > The linux kernel has no problem when you open the CFS file with SEQUENTIAL and then you change the read advice to RANDOM. Indeed it's not a problem, just inefficient, as setting a SEQUENTIAL advice would be useless if we then immediately set RANDOM? (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.) -- 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