MINOR: Change info log to debug for scheduled timer tasks. (#19624)
CI / build (push) Waiting to run Details

* 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 <apoorvmittal10@gmail.com>, Andrew Schofield
 <aschofield@confluent.io>
This commit is contained in:
Sushant Mahajan 2025-05-03 11:48:17 +05:30 committed by GitHub
parent 44025d8116
commit 4558d15856
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 5 deletions

View File

@ -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() {