Skip to content

Commit 45540a4

Browse files
committed
IGNITE-26722 after review #1.2
1 parent cdad2b8 commit 45540a4

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/checkpoint/Checkpointer.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,6 @@ void doCheckpoint() throws IgniteInternalCheckedException {
412412
chp.progress.reason()
413413
);
414414
}
415-
416-
compactor.resume();
417415
}
418416

419417
currentCheckpointProgress.setPagesWriteTimeMillis(
@@ -457,6 +455,8 @@ void doCheckpoint() throws IgniteInternalCheckedException {
457455
throw e;
458456
} finally {
459457
currentCheckpointProgressForThrottling = null;
458+
459+
compactor.resume();
460460
}
461461
}
462462

@@ -550,8 +550,6 @@ private boolean writePages(
550550

551551
tracker.onFsyncEnd();
552552

553-
compactor.resume();
554-
555553
compactor.triggerCompaction();
556554

557555
if (shutdownNow.getAsBoolean()) {

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,8 @@ public void resume() {
525525
}
526526

527527
/** Must be called before each IO operation to provide other IO components with resources. */
528-
private void pauseCompactionIfNeeded() {
529-
boolean interrupted = false;
528+
private void pauseCompactionIfNeeded() throws InterruptedException {
529+
InterruptedException interruptedException = null;
530530

531531
synchronized (pauseMux) {
532532
while (paused) {
@@ -537,15 +537,19 @@ private void pauseCompactionIfNeeded() {
537537
} catch (InterruptedException e) {
538538
LOG.debug("Compactor pause was interrupted", e);
539539

540-
interrupted = true;
540+
interruptedException = e;
541+
542+
break;
541543
} finally {
542544
blockingSectionEnd();
543545
}
544546
}
545547
}
546548

547-
if (interrupted) {
549+
if (interruptedException != null) {
548550
Thread.currentThread().interrupt();
551+
552+
throw interruptedException;
549553
}
550554
}
551555
}

0 commit comments

Comments
 (0)