[
https://issues.apache.org/jira/browse/LUCENE-10521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17526002#comment-17526002
]
Gautam Worah edited comment on LUCENE-10521 at 4/21/22 7:15 PM:
----------------------------------------------------------------
Welp, I thought about this a bit and the solution to this is to just not run
this test on Windows systems. Since Windows prevents the deletes of open files,
which our test specifically does when it deletes underlying index files (with
older existing {{{}DirectoryReaders{}}}), we have no other option than to
prevent this test from running on Windows systems. We can use the
{{Constants.WINDOWS}} boolean to identify if the system is Windows or no and
use it with the {{assumeFalse}} construct.
was (Author: gworah):
Welp, I thought about this a bit and the solution to this is to just not run
this test on Windows systems. Since Windows prevents the deletes of open files,
which our test specifically does when it deletes underlying index files (with
older existing `DirectoryReaders`), we have no other option than to prevent
this test from running on Windows systems. We can use the `Constants.WINDOWS`
boolean to identify if the system is Windows or no and use it with the
`assumeFalse` construct.
> Tests in windows are failing for the new
> testAlwaysRefreshDirectoryTaxonomyReader test
> --------------------------------------------------------------------------------------
>
> Key: LUCENE-10521
> URL: https://issues.apache.org/jira/browse/LUCENE-10521
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/facet
> Environment: Windows 10
> Reporter: Gautam Worah
> Priority: Minor
>
> Build: [https://jenkins.thetaphi.de/job/Lucene-main-Windows/10725/] is
> failing.
>
> Specifically, the loop which checks if any files still remain to be deleted
> is not ending.
> We have added an exception to the main test class to not run the test on
> WindowsFS (not sure if this is related).
>
> ```
> SEVERE: 1 thread leaked from SUITE scope at
> org.apache.lucene.facet.taxonomy.directory.TestAlwaysRefreshDirectoryTaxonomyReader:
> 1) Thread[id=19,
> name=TEST-TestAlwaysRefreshDirectoryTaxonomyReader.testAlwaysRefreshDirectoryTaxonomyReader-seed#[F46E42CB7F2B6959],
> state=RUNNABLE, group=TGRP-TestAlwaysRefreshDirectoryTaxonomyReader] at
> java.base@18/sun.nio.fs.WindowsNativeDispatcher.GetFileAttributesEx0(Native
> Method) at
> java.base@18/sun.nio.fs.WindowsNativeDispatcher.GetFileAttributesEx(WindowsNativeDispatcher.java:390)
> at
> java.base@18/sun.nio.fs.WindowsFileAttributes.get(WindowsFileAttributes.java:307)
> at
> java.base@18/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:251)
> at
> java.base@18/sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:105)
> at
> app/[email protected]/org.apache.lucene.tests.mockfile.FilterFileSystemProvider.delete(FilterFileSystemProvider.java:130)
> at
> app/[email protected]/org.apache.lucene.tests.mockfile.FilterFileSystemProvider.delete(FilterFileSystemProvider.java:130)
> at
> app/[email protected]/org.apache.lucene.tests.mockfile.FilterFileSystemProvider.delete(FilterFileSystemProvider.java:130)
> at
> app/[email protected]/org.apache.lucene.tests.mockfile.FilterFileSystemProvider.delete(FilterFileSystemProvider.java:130)
> at
> app/[email protected]/org.apache.lucene.tests.mockfile.FilterFileSystemProvider.delete(FilterFileSystemProvider.java:130)
> at java.base@18/java.nio.file.Files.delete(Files.java:1152) at
> app/[email protected]/org.apache.lucene.store.FSDirectory.privateDeleteFile(FSDirectory.java:344)
> at
> app/[email protected]/org.apache.lucene.store.FSDirectory.deletePendingFiles(FSDirectory.java:325)
> at
> app/[email protected]/org.apache.lucene.store.FSDirectory.getPendingDeletions(FSDirectory.java:410)
> at
> app/[email protected]/org.apache.lucene.store.FilterDirectory.getPendingDeletions(FilterDirectory.java:121)
> at
> app//org.apache.lucene.facet.taxonomy.directory.TestAlwaysRefreshDirectoryTaxonomyReader.testAlwaysRefreshDirectoryTaxonomyReader(TestAlwaysRefreshDirectoryTaxonomyReader.java:97)
> ```
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]