mirror of https://github.com/tikv/client-go.git
Delete some unused code (#33)
Signed-off-by: renzheng.wang <renzheng.wang@ucloud.cn>
This commit is contained in:
parent
d9c03d0f44
commit
a72c652ef3
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue