fix AllLocksForTxn (#140)

Co-authored-by: tiddar <zhangweichen@songguo7.com>
This commit is contained in:
tiddar 2020-03-26 14:49:08 +08:00 committed by Connor
parent db46fe7169
commit ca5a7773ac

View File

@ -77,7 +77,7 @@ func (lock *Lock) IsLockedFor(key []byte, txnStartTs uint64, resp interface{}) b
// AllLocksForTxn returns all locks for the current transaction.
func AllLocksForTxn(txn *MvccTxn) ([]KlPair, error) {
var result []KlPair
iter := txn.Reader.IterCF(engine_util.CfLock)
iter := txn.Reader().IterCF(engine_util.CfLock)
defer iter.Close()
for ; iter.Valid(); iter.Next() {