Skip to content

Commit

Permalink
Fix appHash panic by Rbt.ScanAllShortKeys scan key random
Browse files Browse the repository at this point in the history
  • Loading branch information
bluestarhero committed Jan 24, 2024
1 parent 8f34632 commit 8218966
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ebp/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -655,13 +655,11 @@ func (exec *txEngine) checkTxDepsAndUptStandbyQ(txRange *TxRange, txBundle, igno
Runners[idx].Ctx.Rbt.ScanAllShortKeys(func(key [rabbit.KeySize]byte, dirty bool) (stop bool) {
k := binary.LittleEndian.Uint64(key[:])
rwList.add(k, dirty)
if _, ok := touchedSet[k]; ok {
if _, ok := touchedSet[k]; ok && canCommit {
canCommit = false // cannot commit if conflicts with touched KV set
Runners[idx].Status = types.FAILED_TO_COMMIT
return true
} else {
return false
}
return false
})
if canCommit { // record the dirty KVs written by a committable TX into toucchedSet
rwList.updateTouchedSet(touchedSet)
Expand Down

0 comments on commit 8218966

Please sign in to comment.