fix(core): Remove duplicated logs for insights (#16228)

This commit is contained in:
Guillaume Jacquart
2025-06-11 13:36:29 +02:00
committed by GitHub
parent f0cf6dcbcd
commit 56b16b8c0f
3 changed files with 3 additions and 7 deletions

View File

@@ -76,6 +76,7 @@ export class InsightsCollectionService {
startFlushingTimer() { startFlushingTimer() {
this.isAsynchronouslySavingInsights = true; this.isAsynchronouslySavingInsights = true;
this.scheduleFlushing(); this.scheduleFlushing();
this.logger.debug('Started flushing timer');
} }
scheduleFlushing() { scheduleFlushing() {

View File

@@ -42,7 +42,7 @@ export class InsightsPruningService {
this.clearPruningTimer(); this.clearPruningTimer();
this.isStopped = false; this.isStopped = false;
this.scheduleNextPrune(); this.scheduleNextPrune();
this.logger.debug(`Insights pruning every ${this.config.pruneCheckIntervalHours} hours`); this.logger.debug('Started pruning timer');
} }
private clearPruningTimer() { private clearPruningTimer() {
@@ -55,7 +55,7 @@ export class InsightsPruningService {
stopPruningTimer() { stopPruningTimer() {
this.isStopped = true; this.isStopped = true;
this.clearPruningTimer(); this.clearPruningTimer();
this.logger.debug('Stopped Insights pruning'); this.logger.debug('Stopped pruning timer');
} }
private scheduleNextPrune( private scheduleNextPrune(

View File

@@ -42,7 +42,6 @@ export class InsightsService {
startTimers() { startTimers() {
this.collectionService.startFlushingTimer(); this.collectionService.startFlushingTimer();
this.logger.debug('Started flushing timer');
// Start compaction and pruning timers for main leader instance only // Start compaction and pruning timers for main leader instance only
if (this.instanceSettings.isLeader) { if (this.instanceSettings.isLeader) {
@@ -53,19 +52,15 @@ export class InsightsService {
@OnLeaderTakeover() @OnLeaderTakeover()
startCompactionAndPruningTimers() { startCompactionAndPruningTimers() {
this.compactionService.startCompactionTimer(); this.compactionService.startCompactionTimer();
this.logger.debug('Started compaction timer');
if (this.pruningService.isPruningEnabled) { if (this.pruningService.isPruningEnabled) {
this.pruningService.startPruningTimer(); this.pruningService.startPruningTimer();
this.logger.debug('Started pruning timer');
} }
} }
@OnLeaderStepdown() @OnLeaderStepdown()
stopCompactionAndPruningTimers() { stopCompactionAndPruningTimers() {
this.compactionService.stopCompactionTimer(); this.compactionService.stopCompactionTimer();
this.logger.debug('Stopped compaction timer');
this.pruningService.stopPruningTimer(); this.pruningService.stopPruningTimer();
this.logger.debug('Stopped pruning timer');
} }
@OnShutdown() @OnShutdown()