mirror of https://github.com/apache/lucene.git
fix typo - thanks dawid
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1348723 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4110fae40b
commit
3670f4b3c9
|
@ -127,7 +127,7 @@ public class TestDocumentsWriterStallControl extends LuceneTestCase {
|
||||||
int numStallers = atLeast(1);
|
int numStallers = atLeast(1);
|
||||||
int numReleasers = atLeast(1);
|
int numReleasers = atLeast(1);
|
||||||
int numWaiters = atLeast(1);
|
int numWaiters = atLeast(1);
|
||||||
final Synchonizer sync = new Synchonizer(numStallers + numReleasers, numStallers + numReleasers+numWaiters);
|
final Synchronizer sync = new Synchronizer(numStallers + numReleasers, numStallers + numReleasers+numWaiters);
|
||||||
Thread[] threads = new Thread[numReleasers + numStallers + numWaiters];
|
Thread[] threads = new Thread[numReleasers + numStallers + numWaiters];
|
||||||
List<Throwable> exceptions = Collections.synchronizedList(new ArrayList<Throwable>());
|
List<Throwable> exceptions = Collections.synchronizedList(new ArrayList<Throwable>());
|
||||||
for (int i = 0; i < numReleasers; i++) {
|
for (int i = 0; i < numReleasers; i++) {
|
||||||
|
@ -229,14 +229,14 @@ public class TestDocumentsWriterStallControl extends LuceneTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Waiter extends Thread {
|
public static class Waiter extends Thread {
|
||||||
private Synchonizer sync;
|
private Synchronizer sync;
|
||||||
private DocumentsWriterStallControl ctrl;
|
private DocumentsWriterStallControl ctrl;
|
||||||
private AtomicBoolean checkPoint;
|
private AtomicBoolean checkPoint;
|
||||||
private AtomicBoolean stop;
|
private AtomicBoolean stop;
|
||||||
private List<Throwable> exceptions;
|
private List<Throwable> exceptions;
|
||||||
|
|
||||||
public Waiter(AtomicBoolean stop, AtomicBoolean checkPoint,
|
public Waiter(AtomicBoolean stop, AtomicBoolean checkPoint,
|
||||||
DocumentsWriterStallControl ctrl, Synchonizer sync,
|
DocumentsWriterStallControl ctrl, Synchronizer sync,
|
||||||
List<Throwable> exceptions) {
|
List<Throwable> exceptions) {
|
||||||
super("waiter");
|
super("waiter");
|
||||||
this.stop = stop;
|
this.stop = stop;
|
||||||
|
@ -268,7 +268,7 @@ public class TestDocumentsWriterStallControl extends LuceneTestCase {
|
||||||
|
|
||||||
public static class Updater extends Thread {
|
public static class Updater extends Thread {
|
||||||
|
|
||||||
private Synchonizer sync;
|
private Synchronizer sync;
|
||||||
private DocumentsWriterStallControl ctrl;
|
private DocumentsWriterStallControl ctrl;
|
||||||
private AtomicBoolean checkPoint;
|
private AtomicBoolean checkPoint;
|
||||||
private AtomicBoolean stop;
|
private AtomicBoolean stop;
|
||||||
|
@ -276,7 +276,7 @@ public class TestDocumentsWriterStallControl extends LuceneTestCase {
|
||||||
private List<Throwable> exceptions;
|
private List<Throwable> exceptions;
|
||||||
|
|
||||||
public Updater(AtomicBoolean stop, AtomicBoolean checkPoint,
|
public Updater(AtomicBoolean stop, AtomicBoolean checkPoint,
|
||||||
DocumentsWriterStallControl ctrl, Synchonizer sync,
|
DocumentsWriterStallControl ctrl, Synchronizer sync,
|
||||||
boolean release, List<Throwable> exceptions) {
|
boolean release, List<Throwable> exceptions) {
|
||||||
super("updater");
|
super("updater");
|
||||||
this.stop = stop;
|
this.stop = stop;
|
||||||
|
@ -400,12 +400,12 @@ public class TestDocumentsWriterStallControl extends LuceneTestCase {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final class Synchonizer {
|
private static final class Synchronizer {
|
||||||
volatile CountDownLatch waiter;
|
volatile CountDownLatch waiter;
|
||||||
volatile CountDownLatch updateJoin;
|
volatile CountDownLatch updateJoin;
|
||||||
volatile CountDownLatch leftCheckpoint;
|
volatile CountDownLatch leftCheckpoint;
|
||||||
|
|
||||||
public Synchonizer(int numUpdater, int numThreads) {
|
public Synchronizer(int numUpdater, int numThreads) {
|
||||||
reset(numUpdater, numThreads);
|
reset(numUpdater, numThreads);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue