From 4558d15856adb4533b90ecff337f623da915321e Mon Sep 17 00:00:00 2001 From: Sushant Mahajan Date: Sat, 3 May 2025 11:48:17 +0530 Subject: [PATCH] MINOR: Change info log to debug for scheduled timer tasks. (#19624) * We have a 2 perpetual timer tasks in ShareCoordinatorService to do internal topic cleanup and snapshot cold partitions respectively. * There are a few info level logs being printed as part of the procedures. These are introducing noise and are not absolutely necessary. * We also move a debug log to error for the prune job. * To remedy the situation, this PR changes the log level from info to debug. Reviewers: Apoorv Mittal , Andrew Schofield --- .../kafka/coordinator/share/ShareCoordinatorService.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/share-coordinator/src/main/java/org/apache/kafka/coordinator/share/ShareCoordinatorService.java b/share-coordinator/src/main/java/org/apache/kafka/coordinator/share/ShareCoordinatorService.java index 321a1e92ac0..09dcd82f2d8 100644 --- a/share-coordinator/src/main/java/org/apache/kafka/coordinator/share/ShareCoordinatorService.java +++ b/share-coordinator/src/main/java/org/apache/kafka/coordinator/share/ShareCoordinatorService.java @@ -271,7 +271,7 @@ public class ShareCoordinatorService implements ShareCoordinator { } private void setupRecordPruning() { - log.info("Scheduling share-group state topic prune job."); + log.debug("Scheduling share-group state topic prune job."); timer.add(new TimerTask(config.shareCoordinatorTopicPruneIntervalMs()) { @Override public void run() { @@ -291,7 +291,6 @@ public class ShareCoordinatorService implements ShareCoordinator { } private CompletableFuture performRecordPruning(TopicPartition tp) { - // This future will always be completed normally, exception or not. CompletableFuture fut = new CompletableFuture<>(); runtime.scheduleWriteOperation( @@ -322,11 +321,11 @@ public class ShareCoordinatorService implements ShareCoordinator { return; } - log.info("Pruning records in {} till offset {}.", tp, off); + log.debug("Pruning records in {} till offset {}.", tp, off); writer.deleteRecords(tp, off) .whenComplete((res, exp) -> { if (exp != null) { - log.debug("Exception while deleting records in {} till offset {}.", tp, off, exp); + log.error("Exception while deleting records in {} till offset {}.", tp, off, exp); fut.completeExceptionally(exp); return; } @@ -347,7 +346,7 @@ public class ShareCoordinatorService implements ShareCoordinator { } private void setupSnapshotColdPartitions() { - log.info("Scheduling cold share-partition snapshotting."); + log.debug("Scheduling cold share-partition snapshotting."); timer.add(new TimerTask(config.shareCoordinatorColdPartitionSnapshotIntervalMs()) { @Override public void run() {