update dump db tool

Signed-off-by: Liang Zheng <zhengliang0901@gmail.com>
This commit is contained in:
Liang Zheng 2021-12-29 19:07:34 +08:00
parent 69279532f4
commit 0cc789d81d
4 changed files with 5 additions and 5 deletions

View File

@ -236,7 +236,7 @@ func TimeToLiveHTTP(ctx context.Context, id lease.LeaseID, keys bool, url string
return nil, fmt.Errorf(`lease: %v. data = "%s"`, err, string(b))
}
if lresp.LeaseTimeToLiveResponse.ID != int64(id) {
return nil, fmt.Errorf("lease: renew id mismatch")
return nil, fmt.Errorf("lease: TTL id mismatch")
}
return lresp, nil
}

View File

@ -95,7 +95,7 @@ func leaseDecoder(k, v []byte) {
if err := lpb.Unmarshal(v); err != nil {
panic(err)
}
fmt.Printf("lease ID=%016x, TTL=%ds\n", leaseID, lpb.TTL)
fmt.Printf("lease ID=%016x, TTL=%ds, remaining TTL=%ds\n", leaseID, lpb.TTL, lpb.RemainingTTL)
}
func authDecoder(k, v []byte) {