Skip to content

Commit 7734893

Browse files
committed
IGNITE-26722 after review #1.3
1 parent 45540a4 commit 7734893

File tree

1 file changed

+12
-20
lines changed
  • modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/compaction

1 file changed

+12
-20
lines changed

modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/compaction/Compactor.java

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ private DeltaFileForCompaction(
502502
}
503503

504504
/**
505-
* Pauses the compactor until it is resumed or compactor or stopped. It is expected that this method will not be called multiple times
505+
* Pauses the compactor until it is resumed or compactor is stopped. It is expected that this method will not be called multiple times
506506
* in parallel and subsequent calls will strictly be calls after {@link #resume}.
507507
*/
508508
public void pause() {
@@ -526,30 +526,22 @@ public void resume() {
526526

527527
/** Must be called before each IO operation to provide other IO components with resources. */
528528
private void pauseCompactionIfNeeded() throws InterruptedException {
529-
InterruptedException interruptedException = null;
530-
531-
synchronized (pauseMux) {
532-
while (paused) {
533-
blockingSectionBegin();
534-
535-
try {
536-
pauseMux.wait();
537-
} catch (InterruptedException e) {
538-
LOG.debug("Compactor pause was interrupted", e);
539-
540-
interruptedException = e;
529+
try {
530+
synchronized (pauseMux) {
531+
while (paused) {
532+
blockingSectionBegin();
541533

542-
break;
543-
} finally {
544-
blockingSectionEnd();
534+
try {
535+
pauseMux.wait();
536+
} finally {
537+
blockingSectionEnd();
538+
}
545539
}
546540
}
547-
}
548-
549-
if (interruptedException != null) {
541+
} catch (InterruptedException e) {
550542
Thread.currentThread().interrupt();
551543

552-
throw interruptedException;
544+
throw e;
553545
}
554546
}
555547
}

0 commit comments

Comments
 (0)