Skip to content

Commit 130876c

Browse files
committed
apply review feedback
1 parent 60392c7 commit 130876c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/java/org/apache/cassandra/db/compaction/BackgroundCompactionRunner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ public static void handleCompactionError(Throwable t, ColumnFamilyStore cfs)
463463
// we might have to rely on error message parsing...
464464
t = t instanceof FSError ? t : new FSWriteError(t);
465465
JVMStabilityInspector.inspectThrowable(t);
466-
CompactionManager.instance.incrementAborted();
466+
CompactionManager.instance.incrementFailed();
467467
}
468468
// No-Space-Left IO exception is thrown by JDK when disk has reached its capacity. The key difference between this
469469
// and the earlier case with `FSDiskFullWriteError` is that here we have definitively run out of disk space, and

test/unit/org/apache/cassandra/db/compaction/BackgroundCompactionRunnerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,13 +586,13 @@ public void handleFSWriteError()
586586
diskErrorEncountered.set(err);
587587
});
588588

589-
long before = CompactionManager.instance.getMetrics().compactionsAborted.getCount();
589+
long before = CompactionManager.instance.getMetrics().totalCompactionsFailed.getCount();
590590

591591
FSWriteError fsWriteError = new FSWriteError(null, "file");
592592
BackgroundCompactionRunner.handleCompactionError(fsWriteError, cfs);
593593

594594
assertThat(diskErrorEncountered.get()).isSameAs(fsWriteError);
595-
assertThat(CompactionManager.instance.getMetrics().compactionsAborted.getCount()).isEqualTo(before + 1);
595+
assertThat(CompactionManager.instance.getMetrics().totalCompactionsFailed.getCount()).isEqualTo(before + 1);
596596
}
597597
finally
598598
{

0 commit comments

Comments
 (0)