Repository navigation
refactor: gate ADO.NET receiver work - #11265
Merged
ReubenBond merged 1 commit intoSep 16, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved issues were identified that would block approval.
Review tier: Lite
Findings: None
What changed in this PR
Refactors ADO.NET receiver lifecycle management around AdmissionGate, with expanded tests and documentation.
Changes:
- Gates dequeue and confirmation operations during shutdown.
- Adds lifecycle, fault, concurrency, rejection, and timeout tests.
- Documents shutdown and redelivery behavior.
| File | Description |
|---|---|
test/Extensions/Orleans.AdoNet.Tests/Streaming/AdoNetQueueAdapterReceiverTests.cs |
Adds lifecycle and failure-mode coverage. |
src/Orleans.Core/Orleans.Core.csproj |
Grants the ADO.NET provider access to AdmissionGate. |
src/AdoNet/Orleans.Streaming.AdoNet/README.md |
Documents shutdown and redelivery semantics. |
src/AdoNet/Orleans.Streaming.AdoNet/AdoNetQueueAdapterReceiver.cs |
Implements admission-gated receiver lifecycle handling. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Code coverage
Report-only conclusion: improved. The current-main baseline is commit Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities. The comparison remains report-only while normal line and branch variance is calibrated. Coverage details |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
AdoNetQueueAdapterReceivermaintains a shutdown flag, a locked operation count, and a new completion source for every busy burst. Confirmation preparation also occurs before its operation-releasefinally, allowing preparation failures to leave shutdown waiting for an operation which has already failed.Solution
Use the merged
AdmissionGatewith one scoped admission for each complete dequeue or confirmation operation. Shutdown closes admission synchronously, waits for the actual drain within the existing timeout, then releases pending messages. Retain the receipt dictionary lock, receipt-version checks, rejection results, and existing query/timeout logging.Grant only
Orleans.Streaming.AdoNetaccess to Core internals. Extend the provider-independent lifecycle suite with deterministic bookkeeping boundaries, both concurrent completion orders, post-close rejection, query/conversion/preparation faults, and timeout behavior. Document the receiver's shutdown and redelivery behavior in its package README.Rationale
Scoped ownership covers conversion and receipt bookkeeping as well as database work, while the gate supplies terminal admission and drain accounting without per-burst completion sources. This PR is independent of other AdmissionGate adoption work and is based directly on
main.Microsoft Reviewers: Open in CodeFlow