[ https://issues.apache.org/jira/browse/LUCENE-9774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17286809#comment-17286809 ]
ASF subversion and git services commented on LUCENE-9774: --------------------------------------------------------- Commit 6deee143823bcba3849fe204b035d6e0bca23e83 in lucene-solr's branch refs/heads/master from Robert Muir [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=6deee14 ] LUCENE-9774: Fix TestDirectIODirectory to probe for supported filesystem (#2396) TestDirectIODirectory will currently fail if run on an unsupported filesystem (e.g. tmpfs). Add an "assume" that probes if the filesystem supports Direct I/O. Also tweak javadocs to indicate correct @throws clauses for the IndexInput and IndexOutput. You'll get an IOException (translated from EINVAL) if the filesystem doesn't support it, not a UOE. > TestDirectIODirectory fails with EINVAL on some filesystems > ----------------------------------------------------------- > > Key: LUCENE-9774 > URL: https://issues.apache.org/jira/browse/LUCENE-9774 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Robert Muir > Priority: Major > Time Spent: 1h 40m > Remaining Estimate: 0h > > These tests fail for me because i run tests on a tmpfs mount (to save my SSD). > This DirectIOIndexOutput documents via {{@throws}} that it will throw > UnsupportedOperationException if Direct I/O is unsupported, but I get > IOException("Invalid argument"). I think we should add another {{@throws}} to > the javadocs. > As far as TestDirectIODirectory.checkSupported(), this currently only checks > that the JDK has support, but not the filesystem. In my case the filesystem > is unsupported, so maybe we should add an additional test for that. > {noformat} > 2> NOTE: reproduce with: gradlew test --tests > TestDirectIODirectory.testVLong -Dtests.seed=7CED10E6374B34E6 > -Dtests.slow=true -Dtests.badapples=true -Dtests.locale=sr-Latn-RS > -Dtests.timezone=ART -Dtests.asserts=true -Dtests.file.encoding=UTF-8 > > java.nio.file.FileSystemException: > /tmp/lucene_gradle/lucene.misc.store.TestDirectIODirectory_7CED10E6374B34E6-001/testUnalignedFloats-001/Floats: > Invalid argument > > at > __randomizedtesting.SeedInfo.seed([7CED10E6374B34E6:551B4601DED6C6E8]:0) > > at > java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100) > > at > java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) > > at > java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) > > at > java.base/sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:181) > > at > org.apache.lucene.mockfile.FilterFileSystemProvider.newFileChannel(FilterFileSystemProvider.java:200) > > at > org.apache.lucene.mockfile.HandleTrackingFS.newFileChannel(HandleTrackingFS.java:171) > > at > org.apache.lucene.mockfile.HandleTrackingFS.newFileChannel(HandleTrackingFS.java:171) > > at > org.apache.lucene.mockfile.FilterFileSystemProvider.newFileChannel(FilterFileSystemProvider.java:200) > > at > java.base/java.nio.channels.FileChannel.open(FileChannel.java:292) > > at > java.base/java.nio.channels.FileChannel.open(FileChannel.java:345) > > at > org.apache.lucene.misc.store.DirectIODirectory$DirectIOIndexOutput.<init>(DirectIODirectory.java:217) > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org