Repository navigation
[SDBM-1807] Do not submit plan events when plan definition has been evicted from cache - #20584
Merged
Merged
Conversation
natashadada
force-pushed
the
natasha.dada/SDBM-1807
branch
from
June 25, 2025 17:30
0dfe911 to
8946931
Compare
natashadada
force-pushed
the
natasha.dada/SDBM-1807
branch
from
June 25, 2025 17:34
0ccce83 to
a09cfe0
Compare
natashadada
marked this pull request as ready for review
June 25, 2025 17:38
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
nenadnoveljic
approved these changes
Jun 30, 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.
There are cases where we are not able get a plan from the cache (ex. sqlserver evicted the relevant plan to free up memory). When this happens, we still submit a plan event with a plan signature but no plan definition. When querying for plans this is a bit weird since we say we've collected a plan because we see a plan event with a plan signature but we don't have the actual plan to show the user.
I see a few options here:
This PR is for option 1. If there is a collection errors, then we still submit the plan but if there's not collection error and no plan definition, we skip the plan event. We have a log line when we fail to load plan, so users can still see when this happens and we can see it in debug flares.
If a plan is encrypted, we don't get a plan definition. In this case, I am adding a collection error. I will update the front end to have support for this error in https://github.com/DataDog/web-ui/pull/212997.
Support ticket: https://datadoghq.atlassian.net/browse/SDBM-1807