Make orphan-call transaction abort deterministic#9930
Conversation
Replace the fire-and-forget grain call in OrphanCallTransaction with a direct ambient transaction fork, which always leaves an unjoined pending call and deterministically triggers OrleansOrphanCallException. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This pull request improves the determinism of the AbortTransactionOnOrphanCalls test by changing how orphan calls are created in the transaction system. Instead of making an actual unawaited grain call which could have timing dependencies, the code now directly forks the transaction info to create a deterministic orphan call scenario.
Changes:
- Modified
OrphanCallTransactionmethod to fork the ambient transaction info directly instead of making an unawaited grain call - Added
Orleans.Transactionsnamespace import to support the new implementation
| @@ -28,7 +29,7 @@ public Task MultiGrainDouble(List<ITransactionTestGrain> grains) | |||
|
|
|||
| public Task OrphanCallTransaction(ITransactionTestGrain grain) | |||
There was a problem hiding this comment.
The grain parameter is no longer used in this method. Consider removing it from the method signature to avoid confusion and maintain a cleaner API. This would require updating the interface ITransactionCoordinatorGrain and any tests that call this method.
There was a problem hiding this comment.
Good catch. I removed the unused grain parameter from OrphanCallTransaction across the interface, implementation, test runner call site, and API baseline, and re-ran the targeted plus stress transaction tests.
Address PR feedback by removing the now-unused grain parameter from OrphanCallTransaction in the coordinator interface/implementation and updating call sites and API baseline. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Make orphan-call transaction abort deterministic Replace the fire-and-forget grain call in OrphanCallTransaction with a direct ambient transaction fork, which always leaves an unjoined pending call and deterministically triggers OrleansOrphanCallException. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove unused orphan-call parameter Address PR feedback by removing the now-unused grain parameter from OrphanCallTransaction in the coordinator interface/implementation and updating call sites and API baseline. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Testing
Microsoft Reviewers: Open in CodeFlow