@@ -459,7 +459,6 @@ protected static final class IndexThrottle {
459459 private final Lock pauseIndexingLock = new ReentrantLock ();
460460 private final Condition pauseCondition = pauseIndexingLock .newCondition ();
461461 private final ReleasableLock pauseLockReference = new ReleasableLock (pauseIndexingLock );
462- // private volatile AtomicBoolean pauseIndexing = new AtomicBoolean();
463462 private volatile AtomicBoolean pauseThrottling = new AtomicBoolean ();
464463 private final boolean pauseWhenThrottled ;
465464 private volatile ReleasableLock lock = NOOP_LOCK ;
@@ -472,7 +471,6 @@ public Releasable acquireThrottle() {
472471 if (lock == pauseLockReference ) {
473472 pauseLockReference .acquire ();
474473 try {
475- // while (pauseIndexing.getAcquire()) {
476474 // If throttling is activate and not temporarily paused
477475 while ((lock == pauseLockReference ) && (pauseThrottling .getAcquire () == false )) {
478476 logger .trace ("Waiting on pause indexing lock" );
@@ -511,7 +509,6 @@ public void deactivate() {
511509 if (pauseWhenThrottled ) {
512510 // Signal the threads that are waiting on pauseCondition
513511 try (Releasable releasableLock = pauseLockReference .acquire ()) {
514- // pauseIndexing.setRelease(false);
515512 pauseCondition .signalAll ();
516513 }
517514 logger .trace ("Deactivated index throttling pause" );
@@ -546,7 +543,6 @@ boolean isThrottled() {
546543 public void pauseThrottle () {
547544 if (pauseWhenThrottled ) {
548545 try (Releasable releasableLock = pauseLockReference .acquire ()) {
549- // pauseIndexing.setRelease(false);
550546 pauseThrottling .setRelease (true );
551547 pauseCondition .signalAll ();
552548 }
@@ -557,7 +553,6 @@ public void pauseThrottle() {
557553 public void unpauseThrottle () {
558554 if (pauseWhenThrottled ) {
559555 try (Releasable releasableLock = pauseLockReference .acquire ()) {
560- // pauseIndexing.setRelease(true);
561556 pauseThrottling .setRelease (false );
562557 pauseCondition .signalAll ();
563558 }
0 commit comments