mirror of https://github.com/apache/lucene.git
LUCENE-2225: fix thread hazard that can cause testBGSearchTaskThreads to run forever
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@900331 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
78e45c92a7
commit
9a931ddf6c
|
@ -92,6 +92,7 @@ public class NearRealtimeReaderTask extends PerfTask {
|
|||
r = newReader;
|
||||
}
|
||||
}
|
||||
stopNow = false;
|
||||
|
||||
return reopenCount;
|
||||
}
|
||||
|
|
|
@ -134,7 +134,6 @@ public abstract class PerfTask implements Cloneable {
|
|||
* @return number of work items done by this task.
|
||||
*/
|
||||
public final int runAndMaybeStats(boolean reportStats) throws Exception {
|
||||
stopNow = false;
|
||||
if (!reportStats || shouldNotRecordStats()) {
|
||||
setup();
|
||||
int count = doLogic();
|
||||
|
|
|
@ -230,6 +230,8 @@ public class TaskSequence extends PerfTask {
|
|||
getRunData().getPoints().getCurrentStats().setCountsByTime(countsByTime, logByTimeMsec);
|
||||
}
|
||||
|
||||
stopNow = false;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
@ -276,6 +278,7 @@ public class TaskSequence extends PerfTask {
|
|||
}
|
||||
}
|
||||
}
|
||||
stopNow = false;
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue