mirror of https://github.com/apache/lucene.git
LUCENE-4245: better record interruption
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1364908 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6fa408286d
commit
28ced818d3
|
@ -870,7 +870,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {
|
|||
}
|
||||
|
||||
private void closeInternal(boolean waitForMerges, boolean doFlush) throws IOException {
|
||||
boolean interrupted = Thread.interrupted();
|
||||
boolean interrupted = false;
|
||||
try {
|
||||
|
||||
if (pendingCommit != null) {
|
||||
|
@ -894,6 +894,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {
|
|||
|
||||
} finally {
|
||||
// clean up merge scheduler in all cases, although flushing may have failed:
|
||||
interrupted = Thread.interrupted();
|
||||
|
||||
if (waitForMerges) {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue