From af8c452b5be1e409daadcc8cd857c6eadec743ce Mon Sep 17 00:00:00 2001 From: Tanjin Xu <109303790+tanjinx@users.noreply.github.com> Date: Thu, 7 Nov 2024 15:39:10 -0800 Subject: [PATCH] Patch: disable extensive keyspace events logging (#554) --- go/vt/discovery/keyspace_events.go | 10 ++++++---- go/vt/vtgate/buffer/shard_buffer.go | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/go/vt/discovery/keyspace_events.go b/go/vt/discovery/keyspace_events.go index 014284ed5ee..770fb125480 100644 --- a/go/vt/discovery/keyspace_events.go +++ b/go/vt/discovery/keyspace_events.go @@ -312,10 +312,12 @@ func (kss *keyspaceState) ensureConsistentLocked() { Serving: sstate.serving, }) - log.Infof("keyspace event resolved: %s/%s is now consistent (serving: %v)", - sstate.target.Keyspace, sstate.target.Keyspace, - sstate.serving, - ) + // Disable it due to log storm in production + // thread https://slack-pde.slack.com/archives/C06CPL4HMED/p1729896804879749 + // log.Infof("keyspace event resolved: %s/%s is now consistent (serving: %v)", + // sstate.target.Keyspace, sstate.target.Keyspace, + // sstate.serving, + // ) if !sstate.serving { delete(kss.shards, shard) diff --git a/go/vt/vtgate/buffer/shard_buffer.go b/go/vt/vtgate/buffer/shard_buffer.go index bb38dcd2caa..219323756e7 100644 --- a/go/vt/vtgate/buffer/shard_buffer.go +++ b/go/vt/vtgate/buffer/shard_buffer.go @@ -475,8 +475,10 @@ func (sb *shardBuffer) recordKeyspaceEvent(alias *topodatapb.TabletAlias, stillS sb.mu.Lock() defer sb.mu.Unlock() - log.Infof("disruption in shard %s/%s resolved (serving: %v), movetable state %#v", - sb.keyspace, sb.shard, stillServing, keyspaceEvent.MoveTablesState) + // Disable it due to log storm in production + // thread https://slack-pde.slack.com/archives/C06CPL4HMED/p1729896804879749 + // log.Infof("disruption in shard %s/%s resolved (serving: %v), movetable state %#v", + // sb.keyspace, sb.shard, stillServing, keyspaceEvent.MoveTablesState) if !topoproto.TabletAliasEqual(alias, sb.currentPrimary) { if sb.currentPrimary != nil {