Skip to content

Commit e8c3b29

Browse files
committed
sql/hints: remove noisy logging
This commit removes a noisy source of log messages by only logging for incremental updates with a non-empty list of events. This prevents spamming log messages every time the resolved timestamp for the rangefeed is incremented. Epic: None Release note: None
1 parent c321b39 commit e8c3b29

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

pkg/sql/hints/hint_cache.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ func (c *StatementHintsCache) onUpdate(
210210
if update.Type == rangefeedcache.CompleteUpdate {
211211
log.Dev.Info(ctx, "statement_hints rangefeed completed initial scan")
212212
c.handleInitialScan(update)
213-
} else {
213+
} else if len(update.Events) > 0 {
214+
// Ignore empty updates that only bump the resolved timestamp.
214215
log.Dev.Info(ctx, "statement_hints rangefeed applying incremental update")
215216
c.handleIncrementalUpdate(ctx, update)
216217
}
@@ -248,10 +249,6 @@ func (c *StatementHintsCache) handleInitialScan(update rangefeedcache.Update[*bu
248249
func (c *StatementHintsCache) handleIncrementalUpdate(
249250
ctx context.Context, update rangefeedcache.Update[*bufferEvent],
250251
) {
251-
if len(update.Events) == 0 {
252-
// Avoid synchronization when we're just bumping the resolved timestamp.
253-
return
254-
}
255252
defer c.generation.Add(1)
256253
c.mu.Lock()
257254
defer c.mu.Unlock()

0 commit comments

Comments
 (0)