Repository navigation
Conversation
The benchmark query is 150 levels deep, but since validation started enforcing QueryComplexityLimits (default maxDepth=100) every execution failed with MaxQueryDepthExceeded and returned no data. The benchmark was therefore measuring a cached validation error (~8M ops/s) rather than execution. Raise the max depth for the benchmark requests via the GraphQLContext and fail fast at class initialisation if the query does not execute cleanly, so the benchmark cannot silently regress like this again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Meemaw
marked this pull request as ready for review
October 17, 2026 19:55
This branch has not been deployed
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.
Problem
TwitterBenchmarkbuilds a query that is 150 levels deep. Since e4c287c ("Add query depth and field count limits to Validator") validation enforcesQueryComplexityLimitswith a defaultmaxDepthof 100, so every benchmark execution fails with:and returns
data == null. Because the benchmark uses a persisted query cache, it has been measuring the return of a cached validation error (~8M ops/s) rather than execution, and those numbers flow into the performance results history.Fix
QueryComplexityLimitswithmaxDepth(DEPTH + 1)through the request'sGraphQLContext(QueryComplexityLimits.KEY) rather than changing the global default, so other benchmarks in the same JVM are unaffected.Verification
MaxQueryDepthExceeded,data == null; benchmark reports ~8,090,000 ops/s.DEPTH - 1makes class initialisation throwExceptionInInitializerError, confirming the fail-fast check works.graphql.archunit.*tests pass (JMH fork rule).Note: the historical
TwitterBenchmarknumbers recorded since the limits were introduced are not comparable with results after this change.