diff --git a/owner/manager.go b/owner/manager.go index bde74c5b8eb3c..0c7a5cd8a333c 100644 --- a/owner/manager.go +++ b/owner/manager.go @@ -381,7 +381,7 @@ func (m *ownerManager) SetOwnerOpValue(ctx context.Context, op OpType) error { Then(clientv3.OpPut(ownerKey, string(newOwnerVal))). Commit() logutil.BgLogger().Info("set owner op value", zap.String("owner key", ownerKey), zap.ByteString("ownerID", ownerID), - zap.Stringer("old Op", op), zap.Stringer("op", op), zap.Bool("isSuc", resp.Succeeded), zap.Error(err)) + zap.Stringer("old Op", currOp), zap.Stringer("op", op), zap.Bool("isSuc", resp.Succeeded), zap.Error(err)) if !resp.Succeeded { err = errors.New("put owner key failed, cmp is false") } diff --git a/owner/mock.go b/owner/mock.go index 92867245eeb88..0778921e1e0c9 100644 --- a/owner/mock.go +++ b/owner/mock.go @@ -79,7 +79,7 @@ func (m *mockManager) GetOwnerID(_ context.Context) (string, error) { return "", errors.New("no owner") } -func (m *mockManager) SetOwnerOpValue(ctx context.Context, op OpType) error { +func (*mockManager) SetOwnerOpValue(_ context.Context, _ OpType) error { return nil }