zacharymorn commented on pull request #2396:
URL: https://github.com/apache/lucene-solr/pull/2396#issuecomment-781053065


   Hi @rmuir, thanks for cc-ing me! For the exception that's being thrown when 
the file system does not support direct IO, per java doc of 
`ExtendedOpenOption.DIRECT` it should actually throw 
`UnsupportedOperationException`:
    
   ```
   Attempting to open a file with this option set will result in an {@code 
UnsupportedOperationException} if the operating system or file system does not 
support Direct I/O or a sufficient equivalent.
   ```
   
   so it's a bit unexpected to me that IOException is being thrown there. Could 
it be a jdk implementation bug?
   
   For probing alternative in addition to checking `IOException` / 
`UnsupportedOperationException`, I searched around a bit and found this:
   
   
https://github.com/openjdk/jdk11u-dev/blob/58082bd009883c6dcb779ac02333ea225097e182/test/jdk/java/nio/channels/FileChannel/directio/DirectIOTest.java#L82-L94
   
   Maybe we can do something similar if file system such as `tmpfs` has 
different file system type naming? 
   


----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to