Skip to content

Make orphan-call transaction abort deterministic#9930

Merged
ReubenBond merged 2 commits into
dotnet:mainfrom
ReubenBond:fix/flaky-orphan-call-abort
Feb 16, 2026
Merged

Make orphan-call transaction abort deterministic#9930
ReubenBond merged 2 commits into
dotnet:mainfrom
ReubenBond:fix/flaky-orphan-call-abort

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Feb 16, 2026

Copy link
Copy Markdown
Member

Summary

  • make AbortTransactionOnOrphanCalls deterministic by forking ambient transaction info directly in TransactionCoordinatorGrain.OrphanCallTransaction
  • avoid OneWay + Transaction combinations

Testing

  • dotnet test (targeted AbortTransactionOnOrphanCalls)
  • 40x stress run of targeted test (--no-build)
  • dotnet test for GrainFaultTransactionMemoryTests (--no-build)
Microsoft Reviewers: Open in CodeFlow

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>
Copilot AI review requested due to automatic review settings February 16, 2026 21:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 OrphanCallTransaction method to fork the ambient transaction info directly instead of making an unawaited grain call
  • Added Orleans.Transactions namespace import to support the new implementation

@@ -28,7 +29,7 @@ public Task MultiGrainDouble(List<ITransactionTestGrain> grains)

public Task OrphanCallTransaction(ITransactionTestGrain grain)

Copilot AI Feb 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@ReubenBond ReubenBond enabled auto-merge February 16, 2026 22:13
@ReubenBond ReubenBond added this pull request to the merge queue Feb 16, 2026
Merged via the queue into dotnet:main with commit fbf52ee Feb 16, 2026
59 checks passed
@ReubenBond ReubenBond deleted the fix/flaky-orphan-call-abort branch February 16, 2026 23:36
rkargMsft pushed a commit to rkargMsft/orleans that referenced this pull request Feb 27, 2026
* 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>
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants