Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
80166: kvserver: downgrade spammy "skipping snapshot" message r=aayushshah15 a=tbg

This message wasn't useful, as it is always logged when a LEARNER upreplication
is occurring. Nothing is lost by moving it behind `V(2)`.

Release note: None


Co-authored-by: Tobias Grieger <[email protected]>
  • Loading branch information
craig[bot] and tbg committed Apr 25, 2022
2 parents a1669f1 + c15709c commit d2eafdf
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pkg/kv/kvserver/raft_snapshot_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ func (rq *raftSnapshotQueue) processRaftSnapshot(
return errors.Errorf("%s: replica %d not present in %v", repl, id, desc.Replicas())
}
snapType := kvserverpb.SnapshotRequest_VIA_SNAPSHOT_QUEUE
skipSnapLogLimiter := log.Every(10 * time.Second)

if typ := repDesc.GetType(); typ == roachpb.LEARNER || typ == roachpb.NON_VOTER {
if fn := repl.store.cfg.TestingKnobs.RaftSnapshotQueueSkipReplica; fn != nil && fn() {
Expand All @@ -125,11 +124,7 @@ func (rq *raftSnapshotQueue) processRaftSnapshot(
typ,
repDesc,
)
if skipSnapLogLimiter.ShouldLog() {
log.Infof(ctx, "%v", err)
} else {
log.VEventf(ctx, 3, "%v", err)
}
log.VEventf(ctx, 2, "%v", err)
// TODO(dan): This is super brittle and non-obvious. In the common case,
// this check avoids duplicate work, but in rare cases, we send the
// learner snap at an index before the one raft wanted here. The raft
Expand Down

0 comments on commit d2eafdf

Please sign in to comment.