This is an automated email from the ASF dual-hosted git repository.
schofielaj pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new 4558d15856a MINOR: Change info log to debug for scheduled timer tasks.
(#19624)
4558d15856a is described below
commit 4558d15856adb4533b90ecff337f623da915321e
Author: Sushant Mahajan <[email protected]>
AuthorDate: Sat May 3 11:48:17 2025 +0530
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 <[email protected]>, Andrew Schofield
<[email protected]>
---
.../apache/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<Void> performRecordPruning(TopicPartition tp) {
- // This future will always be completed normally, exception or not.
CompletableFuture<Void> 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() {