Log replication warnings when no error suppression is defined (#9320)

* Log replication warnings when no error suppression is defined

* Add changelog file
This commit is contained in:
Chris Piraino 2021-01-08 14:03:06 -06:00 committed by GitHub
parent 6094b73d89
commit 2eac571276
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

3
.changelog/9320.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
replication: Correctly log all replication warnings that should not be suppressed
```

View File

@ -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)
}