Skip to content

Commit 84decda

Browse files
committed
scheduling: fix atomicity issues
1 parent b4c912a commit 84decda

File tree

2 files changed

+151
-117
lines changed

2 files changed

+151
-117
lines changed

crates/core/src/host/module_host.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,13 +1434,14 @@ impl ModuleHost {
14341434
pub async fn call_reducer_with_params(
14351435
&self,
14361436
reducer_name: &str,
1437+
tx: Option<MutTxId>,
14371438
params: CallReducerParams,
14381439
) -> Result<ReducerCallResult, NoSuchModule> {
14391440
self.call(
14401441
reducer_name,
1441-
params,
1442-
|p, inst| inst.call_reducer(None, p),
1443-
|p, inst| inst.call_reducer(None, p),
1442+
(tx, params),
1443+
|(tx, p), inst| inst.call_reducer(tx, p),
1444+
|(tx, p), inst| inst.call_reducer(tx, p),
14441445
)
14451446
.await
14461447
}
@@ -1472,7 +1473,7 @@ impl ModuleHost {
14721473
};
14731474

14741475
Ok(self
1475-
.call_reducer_with_params(&reducer_def.name, call_reducer_params)
1476+
.call_reducer_with_params(&reducer_def.name, None, call_reducer_params)
14761477
.await?)
14771478
}
14781479

0 commit comments

Comments
 (0)