-
Notifications
You must be signed in to change notification settings - Fork 249
Optimize health check response using parallel queries #2714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
/azp run |
Azure Pipelines successfully started running 6 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves the health check endpoint’s performance by parallelizing entity queries and exposing a configurable degree of parallelism.
- Introduce a
max-query-parallelism
config option (default 4, max 8) with automatic range clamping - Update
HealthCheckHelper
to run entity health checks in parallel viaParallel.ForEachAsync
- Add model, converter, constants, and JSON schema entries for the new config
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
src/Service/HealthCheck/HealthCheckHelper.cs | Parallelize entity health checks and aggregate results |
src/Config/ObjectModel/EntityCacheOptions.cs | Define default and limit constants for parallelism |
src/Config/HealthCheck/RuntimeHealthCheckConfig.cs | Add MaxQueryParallelism property with default logic |
src/Config/Converters/RuntimeHealthOptionsConvertorFactory.cs | Parse and clamp max-query-parallelism from JSON |
schemas/dab.draft.schema.json | Add schema definition for max-query-parallelism |
Comments suppressed due to low confidence (1)
src/Config/ObjectModel/EntityCacheOptions.cs:39
- [nitpick] The suffix
_LIMIT
is a bit ambiguous. Consider renaming toDEFAULT_MAX_QUERY_PARALLELISM_MAX
for symmetry withDEFAULT_MAX_QUERY_PARALLELISM
.
public const int DEFAULT_MAX_QUERY_PARALLELISM_LIMIT = 8;
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Why make this change?
What is this change?
Usage
max-query-parallelism
can be set in the config, e.g.:"runtime": { "health": { "max-query-parallelism": 8 } }
4
and out of range max-value defaults to8
How was this tested?
Sample Request(s)