Skip to content

Commit

Permalink
owner: address a comment and tiny update
Browse files Browse the repository at this point in the history
  • Loading branch information
zimulala authored and ti-chi-bot committed May 4, 2023
1 parent e22dc90 commit 1b33716
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion owner/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
2 changes: 1 addition & 1 deletion owner/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 1b33716

Please sign in to comment.