You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by md...@apache.org on 2015/07/17 17:02:06 UTC
svn commit: r1691589 -
/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java
Author: mduerig
Date: Fri Jul 17 15:02:06 2015
New Revision: 1691589
URL: http://svn.apache.org/r1691589
Log:
OAK-3051: Improve compaction gain estimation logging for the case where there are no tar readers
Improve logging in the case where there is only a single tar file from the writer.
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java
Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java?rev=1691589&r1=1691588&r2=1691589&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java Fri Jul 17 15:02:06 2015
@@ -475,12 +475,18 @@ public class FileStore implements Segmen
gcMonitor.skipped("TarMK compaction paused");
}
} else {
- gcMonitor.skipped(
- "Estimated compaction in {}, gain is {}% ({}/{}) or ({}/{}), so skipping compaction for now",
- watch, gain, estimate.getReachableSize(),
- estimate.getTotalSize(),
- humanReadableByteCount(estimate.getReachableSize()),
- humanReadableByteCount(estimate.getTotalSize()));
+ if (estimate.getTotalSize() == 0) {
+ gcMonitor.skipped(
+ "Estimated compaction in {}. Skipping compaction for now as repository " +
+ "consists of a single tar file only", watch);
+ } else {
+ gcMonitor.skipped(
+ "Estimated compaction in {}, gain is {}% ({}/{}) or ({}/{}), so skipping compaction for now",
+ watch, gain, estimate.getReachableSize(),
+ estimate.getTotalSize(),
+ humanReadableByteCount(estimate.getReachableSize()),
+ humanReadableByteCount(estimate.getTotalSize()));
+ }
}
if (cleanup) {
cleanupNeeded.set(true);