Skip to content

Commit 3d5492a

Browse files
feat: reduce MongoDB buffer logging verbosity and disable processing rate calculation
1 parent 38f0e39 commit 3d5492a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/api/monitor_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ ORDER BY task_id, collection_name
464464
if totalActiveStreams > 0 && totalExecuted > 0 {
465465
// Simple calculation: assume data represents recent activity
466466
// For more accurate rate, we would need time-based windows
467-
processingRate = fmt.Sprintf("~%d/min", totalExecuted)
467+
// processingRate = fmt.Sprintf("~%d/min", totalExecuted)
468468
}
469469

470470
// Prepare response

pkg/syncer/mongodb/mongodb.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,13 +718,13 @@ func (s *MongoDBSyncer) watchChanges(ctx context.Context, sourceColl, targetColl
718718

719719
if buffSize >= batchSize {
720720
if s.bufferEnabled {
721-
s.logger.Infof("[MongoDB] buffer reached %d => storing to persistent buffer => %s.%s", batchSize, sourceDB, collectionName)
721+
s.logger.Debugf("[MongoDB] buffer reached %d => storing to persistent buffer => %s.%s", batchSize, sourceDB, collectionName)
722722
tokenMutex.RLock()
723723
currentToken := latestToken
724724
tokenMutex.RUnlock()
725725
s.storeToBuffer(ctx, &buffer, sourceDB, collectionName, currentToken)
726726
} else {
727-
s.logger.Infof("[MongoDB] buffer reached %d => flush now => %s.%s", batchSize, sourceDB, collectionName)
727+
s.logger.Debugf("[MongoDB] buffer reached %d => flush now => %s.%s", batchSize, sourceDB, collectionName)
728728
tokenMutex.RLock()
729729
currentToken := latestToken
730730
tokenMutex.RUnlock()

0 commit comments

Comments
 (0)