Author: mduerig
Date: Thu Dec 22 12:51:20 2016
New Revision: 1775645
URL: http://svn.apache.org/viewvc?rev=1775645&view=rev
Log:
OAK-5359: Cancelled garbage collection not reported to GCMonitor
Report cancellation as warnings
Modified:
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java
Modified:
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java?rev=1775645&r1=1775644&r2=1775645&view=diff
==============================================================================
---
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java
(original)
+++
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java
Thu Dec 22 12:51:20 2016
@@ -766,7 +766,7 @@ public class FileStore extends AbstractF
Supplier<Boolean> cancel = new
CancelCompactionSupplier(FileStore.this);
GCEstimation estimate = estimateCompactionGain(cancel);
if (cancel.get()) {
- gcListener.skipped("TarMK GC #{}: estimation
interrupted: {}. Skipping garbage collection.", GC_COUNT, cancel);
+ gcListener.warn("TarMK GC #{}: estimation interrupted:
{}. Skipping garbage collection.", GC_COUNT, cancel);
gcMemoryBarrier.close();
return;
}
@@ -846,7 +846,7 @@ public class FileStore extends AbstractF
SegmentNodeState after = compact(before, writer, cancel);
if (after == null) {
- gcListener.skipped("TarMK GC #{}: compaction cancelled:
{}.", GC_COUNT, cancel);
+ gcListener.warn("TarMK GC #{}: compaction cancelled: {}.",
GC_COUNT, cancel);
return -newGeneration;
}
@@ -870,7 +870,7 @@ public class FileStore extends AbstractF
SegmentNodeState head = getHead();
after = compact(head, writer, cancel);
if (after == null) {
- gcListener.skipped("TarMK GC #{}: compaction
cancelled: {}.", GC_COUNT, cancel);
+ gcListener.warn("TarMK GC #{}: compaction cancelled:
{}.", GC_COUNT, cancel);
return -newGeneration;
}
@@ -899,7 +899,7 @@ public class FileStore extends AbstractF
GC_COUNT, forceWatch,
forceWatch.elapsed(MILLISECONDS));
} else {
if (cancel.get()) {
- gcListener.skipped("TarMK GC #{}: compaction
failed to force compact remaining commits " +
+ gcListener.warn("TarMK GC #{}: compaction
failed to force compact remaining commits " +
"after {} ({} ms). Compaction was
cancelled: {}.",
GC_COUNT, forceWatch,
forceWatch.elapsed(MILLISECONDS), cancel);
} else {