From 64f4d61f91aba102e86326f5d965707fdd160011 Mon Sep 17 00:00:00 2001 From: JmPotato Date: Wed, 2 Sep 2020 13:13:41 +0800 Subject: [PATCH] Update etcd error Signed-off-by: JmPotato --- server/tso/tso.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/tso/tso.go b/server/tso/tso.go index b8fd9759bfd7..72c4433eb578 100644 --- a/server/tso/tso.go +++ b/server/tso/tso.go @@ -83,10 +83,10 @@ func (t *timestampOracle) saveTimestamp(leadership *election.Leadership, ts time Then(clientv3.OpPut(key, string(data))). Commit() if err != nil { - return errs.ErrEtcdTxn.Wrap(err).GenWithStackByCause() + return errs.ErrEtcdKVPut.Wrap(err).GenWithStackByCause() } if !resp.Succeeded { - return errs.ErrSaveTimestamp.FastGenByArgs("maybe we lost leader") + return errs.ErrEtcdTxn.FastGenByArgs() } t.lastSavedTime.Store(ts)