Repository navigation
[Fusion] Hold result document chunks at 16 KB before they grow further - #11047
Merged
Merged
Conversation
Result documents and source result documents doubled their chunk size with every chunk up to 128 KB, so a document of a few hundred KB already rented 64 KB and 128 KB chunks. The chunk sizes now follow one schedule: 1, 2, 4, 8 and 16 KB, seven more chunks of 16 KB, four of 32 KB, two of 64 KB, then 128 KB.
…n a cursor addresses
The stack trace in the snapshots of Source_Schema_Transport_Error names GraphQLHttpResponse.ReadAsResultAsync with its parameters, and the overload that the source schema client calls takes the expected result shape since the shape guided result reading.
The comments of the result document cursors, the data locations and the chunk schedule say what the bits and the tables hold. Comparisons with the earlier layout and notes on how a value is computed are removed.
Contributor
Patch coverage96.0% of changed lines covered (72/75)
Uncovered changed lines (JSON){
"sha": "bbaabb23427075ec9aa77d30f31c363adada909a",
"files": [
{ "path": "src/HotChocolate/Fusion/src/Fusion.Execution/Text/Json/SourceResultDocument.cs", "ranges": [[88, 88], [100, 101]] }
]
}Project coverage: 60.1% (330819/550376 lines) |
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.
Result documents and source result documents doubled their chunk size with every chunk up to 128 KB, so a document of a few hundred KB already rented 64 KB and 128 KB chunks, and the 128 KB chunks live on the large object heap. The chunk sizes of composite rows, source rows and source data now follow one schedule: 1, 2, 4, 8 and 16 KB, seven more chunks of 16 KB, four of 32 KB, two of 64 KB, then 128 KB. Cursor layouts are unchanged. A source result document now takes up to 44,573,956 rows and 534,920,192 bytes (44,670,892 and 536,083,456 before), and one that needs more row chunks than a cursor addresses fails with the error of a document that is too large.
Benchmark twin (Ryzen 7 5700G, gateway on 2 cores), Apollo Federation subgraphs, Native AOT on .NET 11 unless a row says JIT. Before is the combined branch, after is the combined branch with this change alone. Constant-latency: in AOT both gateways in turn against the same subgraph processes with 3 runs per side, in JIT 4 runs from two process starts per side. Constant: 5 process starts before and 3 after (5,337, 5,381 and 5,471 req/s). Large object heap row: collector statistics of a diagnostics build under load.