Delete some unused code (#33)

Signed-off-by: renzheng.wang <renzheng.wang@ucloud.cn>
This commit is contained in:
renzheng.wang 2019-11-01 11:49:46 +08:00 committed by disksing
parent d9c03d0f44
commit a72c652ef3
1 changed files with 1 additions and 3 deletions

View File

@ -57,14 +57,12 @@ func newTransaction(tikvStore *store.TiKVStore, ts uint64) *Transaction {
}
// Get implements transaction interface.
// kv.IsErrNotFound can be used to check the error is a not found error.
func (txn *Transaction) Get(ctx context.Context, k key.Key) ([]byte, error) {
start := time.Now()
defer func() { metrics.TxnCmdHistogram.WithLabelValues("get").Observe(time.Since(start).Seconds()) }()
ret, err := txn.us.Get(ctx, k)
if kv.IsErrNotFound(err) {
return nil, err
}
if err != nil {
return nil, err
}