Repository navigation
[Fusion] Keep identical lookups apart when entity reuse can serve the deeper one - #10661
Merged
Merged
Conversation
Contributor
Patch coverage95.0% of changed lines covered (302/318)
Uncovered changed lines (JSON){
"sha": "0561a371dbb42f4aa26fdd6828023cc3a72bd743",
"files": [
{ "path": "src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Nodes/Serialization/JsonOperationPlanParser.cs", "ranges": [[558, 560]] },
{ "path": "src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Nodes/OperationDefinition.cs", "ranges": [[164, 166]] },
{ "path": "src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Results/EntityReuseCandidateMap.cs", "ranges": [[586, 588]] },
{ "path": "src/HotChocolate/Fusion/src/Fusion.Execution/Planning/OperationPlanner.BuildExecutionTree.cs", "ranges": [[1421, 1424], [2420, 2420], [2433, 2433]] },
{ "path": "src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Nodes/Serialization/JsonOperationPlanFormatter.cs", "ranges": [[535, 535]] }
]
}Project coverage: 59.3% (314983/531458 lines) |
… deeper one The planner merged structurally identical lookups regardless of their dependency depth, so a lookup that could run early waited for the deepest one. When the lookup can take its entities from the result, identical lookups at different depths now stay apart and each deeper lookup depends on the next shallower one, so entity reuse serves it from that result. OperationPlannerOptions.EnableEntityReuseSplitting turns this off and FusionOptions.EnableEntityReuse = false disables it as well. Plans change, so the planner version moves to 2.6.0.
…eaf copy An interface target added a rejected offset entry without reserving its offset segment, so the next concrete duplicate failed to grow the offset buffer.
michaelstaib
force-pushed
the
mst/entity-reuse-lookup-splitting
branch
from
October 22, 2026 20:06
8b5df2f to
2a5a310
Compare
…ipped or fails The dependency that orders a deeper lookup after the identical shallower one is now optional, so it only delays the deeper lookup. The planner and the plan parser derive it from the lookups being identical, so the plan format is unchanged.
This was referenced Oct 25, 2026
Merged
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.
The planner used to merge identical entity lookups at different depths into one request, so a lookup that could run early had to wait for the deepest one.
When entity reuse can serve these lookups, they now stay apart: the shallow lookup runs early and each deeper lookup waits for the one above it.
The deeper lookup then reuses the entities the earlier lookup already fetched, so it requests fewer entities or none at all.