mirror of
https://github.com/apache/lucene.git
synced 2025-02-08 02:58:58 +00:00
LUCENE-4456: fix MDW to print any exc when processing ghost files
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1393464 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1e05df4461
commit
23ff344f82
@ -615,9 +615,14 @@ public class MockDirectoryWrapper extends BaseDirectoryWrapper {
|
||||
if (LuceneTestCase.VERBOSE) {
|
||||
System.out.println("MDW: Unreferenced check: Ignoring segments file: " + file + " that we could not delete.");
|
||||
}
|
||||
try {
|
||||
SegmentInfos sis = new SegmentInfos();
|
||||
try {
|
||||
sis.read(delegate, file);
|
||||
} catch (IOException ioe) {
|
||||
// OK: likely some of the .si files were deleted
|
||||
}
|
||||
|
||||
try {
|
||||
Set<String> ghosts = new HashSet<String>(sis.files(delegate, false));
|
||||
for (String s : ghosts) {
|
||||
if (endSet.contains(s) && !startSet.contains(s)) {
|
||||
@ -629,7 +634,10 @@ public class MockDirectoryWrapper extends BaseDirectoryWrapper {
|
||||
startSet.add(s);
|
||||
}
|
||||
}
|
||||
} catch (Throwable ignore) {}
|
||||
} catch (Throwable t) {
|
||||
System.err.println("ERROR processing leftover segments file " + file + ":");
|
||||
t.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user