diff --git a/s3stream/src/main/java/com/automq/stream/s3/compact/CompactionManager.java b/s3stream/src/main/java/com/automq/stream/s3/compact/CompactionManager.java index 1a6099358..eda57e243 100644 --- a/s3stream/src/main/java/com/automq/stream/s3/compact/CompactionManager.java +++ b/s3stream/src/main/java/com/automq/stream/s3/compact/CompactionManager.java @@ -233,8 +233,9 @@ private void logCompactionPlans(List compactionPlans, Set .mapToLong(CompactedObject::size) .sum()) .sum(); - logger.info("Compaction plans: expect to generate {} StreamObject, 1 WAL object with size {} in {} iterations, objects excluded: {}", - streamObjectNum, walObjectSize, compactionPlans.size(), excludedObjectIds); + int walObjectNum = walObjectSize > 0 ? 1 : 0; + logger.info("Compaction plans: expect to generate {} Stream Object, {} WAL object with size {} in {} iterations, objects excluded: {}", + streamObjectNum, walObjectNum, walObjectSize, compactionPlans.size(), excludedObjectIds); } public CompletableFuture forceSplitAll() { diff --git a/s3stream/src/main/java/com/automq/stream/s3/compact/CompactionUtils.java b/s3stream/src/main/java/com/automq/stream/s3/compact/CompactionUtils.java index 8c04c096b..bb3b544b9 100644 --- a/s3stream/src/main/java/com/automq/stream/s3/compact/CompactionUtils.java +++ b/s3stream/src/main/java/com/automq/stream/s3/compact/CompactionUtils.java @@ -52,7 +52,9 @@ public static List buildObjectStreamRange(List