mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Replaces a number of error equality checks with errors.Is
Signed-off-by: redwrasse <mail@redwrasse.io>
This commit is contained in:
@@ -16,6 +16,7 @@ package v3compactor
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -139,7 +140,7 @@ func (pc *Periodic) Run() {
|
||||
)
|
||||
startTime := pc.clock.Now()
|
||||
_, err := pc.c.Compact(pc.ctx, &pb.CompactionRequest{Revision: rev})
|
||||
if err == nil || err == mvcc.ErrCompacted {
|
||||
if err == nil || errors.Is(err, mvcc.ErrCompacted) {
|
||||
pc.lg.Info(
|
||||
"completed auto periodic compaction",
|
||||
zap.Int64("revision", rev),
|
||||
|
||||
Reference in New Issue
Block a user