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:
Michael McCandless 2010-01-18 10:28:14 +00:00
parent 78e45c92a7
commit 9a931ddf6c
3 changed files with 4 additions and 1 deletions

View File

@ -92,6 +92,7 @@ public class NearRealtimeReaderTask extends PerfTask {
r = newReader;
}
}
stopNow = false;
return reopenCount;
}

View File

@ -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();

View File

@ -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;
}