Skip to content

Commit

Permalink
move buffering logs back to default level
Browse files Browse the repository at this point in the history
Signed-off-by: deepthi <deepthi@planetscale.com>
  • Loading branch information
deepthi committed Jan 29, 2025
1 parent 9c6c380 commit b5de7b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions go/vt/discovery/keyspace_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ func (kss *keyspaceState) ensureConsistentLocked() {
// watcher. this means the ongoing availability event has been resolved, so we can broadcast
// a resolution event to all listeners
kss.consistent = true
log.Infof("keyspace %s is now consistent", kss.keyspace)

kss.moveTablesState = nil

Expand Down
6 changes: 3 additions & 3 deletions go/vt/vtgate/buffer/shard_buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func (sb *shardBuffer) startBufferingLocked(ctx context.Context, kev *discovery.
msg = "Dry-run: Would have started buffering"
}
starts.Add(sb.statsKey, 1)
log.V(2).Infof("%v for shard: %s (window: %v, size: %v, max failover duration: %v) (A failover was detected by this seen error: %v.)",
log.Infof("%v for shard: %s (window: %v, size: %v, max failover duration: %v) (A failover was detected by this seen error: %v.)",
msg,
topoproto.KeyspaceShardString(sb.keyspace, sb.shard),
sb.buf.config.Window,
Expand Down Expand Up @@ -562,7 +562,7 @@ func (sb *shardBuffer) stopBufferingLocked(reason stopReason, details string) {
if sb.mode == bufferModeDryRun {
msg = "Dry-run: Would have stopped buffering"
}
log.V(2).Infof("%v for shard: %s after: %.1f seconds due to: %v. Draining %d buffered requests now.",
log.Infof("%v for shard: %s after: %.1f seconds due to: %v. Draining %d buffered requests now.",
msg, topoproto.KeyspaceShardString(sb.keyspace, sb.shard), d.Seconds(), details, len(q))

var clientEntryError error
Expand Down Expand Up @@ -622,7 +622,7 @@ func (sb *shardBuffer) drain(q []*entry, err error) {
wg.Wait()

d := sb.timeNow().Sub(start)
log.V(2).Infof("Draining finished for shard: %s Took: %v for: %d requests.", topoproto.KeyspaceShardString(sb.keyspace, sb.shard), d, len(q))
log.Infof("Draining finished for shard: %s Took: %v for: %d requests.", topoproto.KeyspaceShardString(sb.keyspace, sb.shard), d, len(q))
requestsDrained.Add(sb.statsKey, int64(len(q)))

// Draining is done. Change state from "draining" to "idle".
Expand Down

0 comments on commit b5de7b1

Please sign in to comment.