apache / apache/lucene

Tests in windows are failing for the new testAlwaysRefreshDirectoryTaxonomyReader test [LUCENE-10521]

Open
#11,557 8 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Minor module:facet type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Build: 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/org.apache.lucene.test_framework@10.0.0-SNAPSHOT/org.apache.lucene.tests.mockfile.FilterFileSystemProvider.delete(FilterFileSystemProvider.java:130) at app/org.apache.lucene.test_framework@10.0.0-SNAPSHOT/org.apache.lucene.tests.mockfile.FilterFileSystemProvider.delete(FilterFileSystemProvider.java:130) at app/org.apache.lucene.test_framework@10.0.0-SNAPSHOT/org.apache.lucene.tests.mockfile.FilterFileSystemProvider.delete(FilterFileSystemProvider.java:130) at app/org.apache.lucene.test_framework@10.0.0-SNAPSHOT/org.apache.lucene.tests.mockfile.FilterFileSystemProvider.delete(FilterFileSystemProvider.java:130) at app/org.apache.lucene.test_framework@10.0.0-SNAPSHOT/org.apache.lucene.tests.mockfile.FilterFileSystemProvider.delete(FilterFileSystemProvider.java:130) at java.base@18/java.nio.file.Files.delete(Files.java:1152) at app/org.apache.lucene.core@10.0.0-SNAPSHOT/org.apache.lucene.store.FSDirectory.privateDeleteFile(FSDirectory.java:344) at app/org.apache.lucene.core@10.0.0-SNAPSHOT/org.apache.lucene.store.FSDirectory.deletePendingFiles(FSDirectory.java:325) at app/org.apache.lucene.core@10.0.0-SNAPSHOT/org.apache.lucene.store.FSDirectory.getPendingDeletions(FSDirectory.java:410) at app/org.apache.lucene.core@10.0.0-SNAPSHOT/org.apache.lucene.store.FilterDirectory.getPendingDeletions(FilterDirectory.java:121) at app//org.apache.lucene.facet.taxonomy.directory.TestAlwaysRefreshDirectoryTaxonomyReader.testAlwaysRefreshDirectoryTaxonomyReader(TestAlwaysRefreshDirectoryTaxonomyReader.java:97)
```

---
Migrated from [LUCENE-10521](https://issues.apache.org/jira/browse/LUCENE-10521) by Gautam Worah (@gautamworah96), updated Apr 22 2022
Environment:
```
Windows 10
```

Contributor guide

Open the contributing guide

Research direction

Start with TestAlwaysRefreshDirectoryTaxonomyReader.testAlwaysRefreshDirectoryTaxonomyReader around line 97 and the Windows Jenkins failure. Inspect the loop checking pending deletions and the Windows stack trace through FSDirectory.getPendingDeletions. Done means the test completes on Windows without hanging, leaked threads, or pending-deletion failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.