storage: let TxnDeleteRange return rev if no error
If it doesn't return error, it should return valid rev.release-2.2
parent
62f7481b19
commit
47b243be5d
|
@ -146,6 +146,8 @@ func (s *store) TxnDeleteRange(txnID int64, key, end []byte) (n, rev int64, err
|
|||
n = s.deleteRange(key, end, s.currentRev.main+1)
|
||||
if n != 0 || s.currentRev.sub != 0 {
|
||||
rev = int64(s.currentRev.main + 1)
|
||||
} else {
|
||||
rev = int64(s.currentRev.main)
|
||||
}
|
||||
return n, rev, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue