Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

Commit 59dc5a2

Browse files
committed
Fix add dependency
1 parent 92ccd32 commit 59dc5a2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

crates/op-rbuilder/src/block_stm/scheduler.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,15 +189,16 @@ impl Scheduler {
189189

190190
pub fn add_dependency(&self, txn_idx: TxnIndex, blocking_txn_idx: TxnIndex) -> bool {
191191
{
192-
let mut dependencies = self.txn_dependency[txn_idx as usize].lock().unwrap();
192+
let mut dependencies = self.txn_dependency[blocking_txn_idx as usize]
193+
.lock()
194+
.unwrap();
193195
if self.txn_status[blocking_txn_idx as usize].lock().unwrap().1
194196
== ExecutionStatus::Executed
195197
{
196198
return false;
197199
}
198200

199-
self.txn_status[blocking_txn_idx as usize].lock().unwrap().1 =
200-
ExecutionStatus::Aborting;
201+
self.txn_status[txn_idx as usize].lock().unwrap().1 = ExecutionStatus::Aborting;
201202
dependencies.insert(txn_idx);
202203
}
203204
// TaskGuard will be dropped by the executor, automatically decrementing num_active_tasks

0 commit comments

Comments
 (0)