Repository navigation
Add plan-bounded resets for Fusion execution contexts - #10114
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces plan-bounded reset behavior for OperationPlanContext to avoid clearing per-node state across the full allocated capacity when only a smaller subset of node slots is active for a given OperationPlan/IncrementalPlan. It also derives plan capabilities (dynamic schema names, batch nodes) to further limit what state is reset/cleared.
Changes:
- Add
UsesDynamicSchemaNames/UsesBatchNodescapability derivation toOperationPlanandIncrementalPlan. - Update
OperationPlanContextpooling + per-event reset logic to clear only the active node slot range and only the state required by the plan’s capabilities. - Add new tests covering subscription-event reuse resets and pool reuse across differently-sized plans (including an initialize-failure path).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Execution/OperationPlanContextResetTests.cs | Adds tests validating Begin() resets per-event state when the same context is reused for subscription events, and validates capability derivation. |
| src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Execution/OperationPlanContextPoolingTests.cs | Adds pooling tests ensuring state from large plans doesn’t leak into smaller plans and that failed initialization returns the context to the pool. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Execution/OperationPlanContext.Pooling.cs | Tracks active node slot count + plan capabilities during Initialize() and clears/disposes only the active range during Clean(). |
| src/HotChocolate/Fusion/src/Fusion.Execution/Execution/OperationPlanContext.cs | Restricts per-event reset work to the active node slot range and capability-gated state. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Nodes/OperationPlan.cs | Derives and stores plan capabilities (UsesDynamicSchemaNames, UsesBatchNodes) by scanning nodes. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Nodes/IncrementalPlan.cs | Derives and stores plan capabilities (UsesDynamicSchemaNames, UsesBatchNodes) by scanning nodes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Patch coverage100.0% of changed lines covered (83/83)
Project coverage: 53.7% (230851/429607 lines) |
This was referenced Jul 23, 2026
chore(deps): Bump HotChocolate.Subscriptions.InMemory from 15.1.14 to 16.5.1
Kuestenlogik/Bowire#506
Merged
This was referenced Aug 1, 2026
This was referenced Aug 10, 2026
Closed
This was referenced Sep 1, 2026
Closed
This was referenced Sep 15, 2026
Closed
[nuget][SUI_Matcher]- Bump the sui-package-updates group with 20 updates
DFE-Digital/SUI_Matcher#405
Closed
This was referenced Sep 22, 2026
Closed
Closed
[nuget][SUI_Matcher]- Bump the sui-package-updates group with 20 updates
DFE-Digital/SUI_Matcher#410
Merged
This was referenced Oct 5, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.