fix: When sql explain plan generation fails, don't attempt to generate an explain plan on future invocations of the same query.#3075
Merged
tippmar-nr merged 20 commits intomainfrom Apr 3, 2025
Conversation
…t attempt to generate an explain plan on future invocations.
…newrelic/newrelic-dotnet-agent into fix/failed-explain-plan-caching
nrcventura
reviewed
Apr 1, 2025
nrcventura
reviewed
Apr 2, 2025
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3075 +/- ##
==========================================
+ Coverage 82.22% 82.29% +0.07%
==========================================
Files 477 477
Lines 30627 30659 +32
Branches 3426 3429 +3
==========================================
+ Hits 25182 25232 +50
+ Misses 4644 4627 -17
+ Partials 801 800 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
nrcventura
approved these changes
Apr 3, 2025
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.
Adds a cache for tracking queries where explain plan generation attempt throws an exception, so that future execution of the same query will not attempt to generate an explain plan. This fix will help ensure database performance doesn't suffer due to repeated, failed explain plan generation attempts.
Cache capacity is configured to 1000 queries, which should be far more than we ever experience in the wild - it is anticipated that explain plan failures are a very rare occurrence.
Includes unit and integration tests.