mirror of
https://github.com/talent-plan/tinykv.git
synced 2024-12-26 12:50:11 +08:00
fix AllLocksForTxn (#140)
Co-authored-by: tiddar <zhangweichen@songguo7.com>
This commit is contained in:
parent
db46fe7169
commit
ca5a7773ac
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user