We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91a2a7e commit e56e1fcCopy full SHA for e56e1fc
1 file changed
crates/core/src/host/module_host.rs
@@ -1788,7 +1788,14 @@ impl ModuleHost {
1788
args,
1789
};
1790
1791
- let prepare_id = format!("prepare-{}", PREPARE_COUNTER.fetch_add(1, Ordering::Relaxed));
+ // Include the coordinator identity so prepare_ids from different coordinators
1792
+ // cannot collide on the participant's st_2pc_state table.
1793
+ let coordinator_hex = caller_identity.to_hex();
1794
+ let prepare_id = format!(
1795
+ "prepare-{}-{}",
1796
+ &coordinator_hex.to_string()[..16],
1797
+ PREPARE_COUNTER.fetch_add(1, Ordering::Relaxed),
1798
+ );
1799
1800
// Channel for signalling PREPARED result back to this task.
1801
let (prepared_tx, prepared_rx) = tokio::sync::oneshot::channel::<(ReducerCallResult, Option<Bytes>)>();
0 commit comments