Skip to content

Commit

Permalink
Log replication warnings when no error suppression is defined (#9320)
Browse files Browse the repository at this point in the history
* Log replication warnings when no error suppression is defined

* Add changelog file
  • Loading branch information
crhino authored and dizzyup committed Apr 21, 2021
1 parent 3e7bb52 commit d802625
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/9320.txt
@@ -0,0 +1,3 @@
```release-note:bug
replication: Correctly log all replication warnings that should not be suppressed
```
2 changes: 1 addition & 1 deletion agent/consul/replication.go
Expand Up @@ -104,7 +104,7 @@ func (r *Replicator) Run(ctx context.Context) error {
// the next round of replication
atomic.StoreUint64(&r.lastRemoteIndex, 0)

if r.suppressErrorLog != nil && !r.suppressErrorLog(err) {
if r.suppressErrorLog == nil || !r.suppressErrorLog(err) {
r.logger.Warn("replication error (will retry if still leader)", "error", err)
}

Expand Down

0 comments on commit d802625

Please sign in to comment.