-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[DBM-2685] Fix explaining parameterized queries flood server logs #15612
Merged
Conversation
This file contains 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
ghost
added
the
integration/postgres
label
Aug 17, 2023
lu-zhengda
changed the title
[DBM-2685] Fix explaining parameterized queries flood server logs with pre-check
[DBM-2685] Fix explaining parameterized queries flood server logs
Aug 17, 2023
ghost
added
the
documentation
label
Aug 17, 2023
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
alexandre-normand
approved these changes
Aug 18, 2023
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.
🙇
brett0000FF
approved these changes
Aug 18, 2023
boluwaji-deriv
pushed a commit
to boluwaji-deriv/integrations-core
that referenced
this pull request
Aug 30, 2023
…taDog#15612) * check if query is parameterized before blindly explain then fail * update CHANGELOG * skip explain parameterized query test for pg version < 12
FlorentClarret
added a commit
that referenced
this pull request
Aug 31, 2023
#15629) * Revise postgresql.replication_delay to Function with Archive WAL-driven PostgreSQL Replica * modify query and also add changelog message * update master with branch * update master with branch * Add short hand for force env rebuild in test (#15716) * add short hand for force-env-rebuild * add changelog entry * styling * [Release] Update metadata (#15717) * [Release] Bumped postgres version to 14.2.1 (#15713) * Bump oracledb version (#15595) * Bump oracledb version * update reqs * update changelog * Mark one metric as optional (#15719) * Update the test environments (#15644) * Update the test environments * Apply suggestions from code review Co-authored-by: Ofek Lev <ofekmeister@gmail.com> * update metadata.csv --------- Co-authored-by: Ofek Lev <ofekmeister@gmail.com> * [DBM-2685] Fix explaining parameterized queries flood server logs (#15612) * check if query is parameterized before blindly explain then fail * update CHANGELOG * skip explain parameterized query test for pg version < 12 * fix rate limited activity collection test case (#15715) * [DBM-2734] fix test_snapshot_xmin for pg > 13 (#15718) * fix test_snapshot_xmin for pg > 13 * reorder the steps to first collect metrics * remove check.cancel() --------- Co-authored-by: Steven Yuen <steven.yuen@datadoghq.com> Co-authored-by: Andrew Zhang <andrew.zhang@datadoghq.com> Co-authored-by: vivek-datadog <131680079+vivek-datadog@users.noreply.github.com> Co-authored-by: Florent Clarret <florent.clarret@datadoghq.com> Co-authored-by: Ofek Lev <ofekmeister@gmail.com> Co-authored-by: Zhengda Lu <zhengda.lu@datadoghq.com>
jmeunier28
pushed a commit
that referenced
this pull request
Sep 19, 2023
…5612) * check if query is parameterized before blindly explain then fail * update CHANGELOG * skip explain parameterized query test for pg version < 12
lu-zhengda
added a commit
that referenced
this pull request
Sep 27, 2023
#15629) * Revise postgresql.replication_delay to Function with Archive WAL-driven PostgreSQL Replica * modify query and also add changelog message * update master with branch * update master with branch * Add short hand for force env rebuild in test (#15716) * add short hand for force-env-rebuild * add changelog entry * styling * [Release] Update metadata (#15717) * [Release] Bumped postgres version to 14.2.1 (#15713) * Bump oracledb version (#15595) * Bump oracledb version * update reqs * update changelog * Mark one metric as optional (#15719) * Update the test environments (#15644) * Update the test environments * Apply suggestions from code review Co-authored-by: Ofek Lev <ofekmeister@gmail.com> * update metadata.csv --------- Co-authored-by: Ofek Lev <ofekmeister@gmail.com> * [DBM-2685] Fix explaining parameterized queries flood server logs (#15612) * check if query is parameterized before blindly explain then fail * update CHANGELOG * skip explain parameterized query test for pg version < 12 * fix rate limited activity collection test case (#15715) * [DBM-2734] fix test_snapshot_xmin for pg > 13 (#15718) * fix test_snapshot_xmin for pg > 13 * reorder the steps to first collect metrics * remove check.cancel() --------- Co-authored-by: Steven Yuen <steven.yuen@datadoghq.com> Co-authored-by: Andrew Zhang <andrew.zhang@datadoghq.com> Co-authored-by: vivek-datadog <131680079+vivek-datadog@users.noreply.github.com> Co-authored-by: Florent Clarret <florent.clarret@datadoghq.com> Co-authored-by: Ofek Lev <ofekmeister@gmail.com> Co-authored-by: Zhengda Lu <zhengda.lu@datadoghq.com>
3 tasks
lu-zhengda
added a commit
that referenced
this pull request
Sep 28, 2023
#15925) * Revise postgresql.replication_delay to Function with Archive WAL-driv… (#15629) * Revise postgresql.replication_delay to Function with Archive WAL-driven PostgreSQL Replica * modify query and also add changelog message * update master with branch * update master with branch * Add short hand for force env rebuild in test (#15716) * add short hand for force-env-rebuild * add changelog entry * styling * [Release] Update metadata (#15717) * [Release] Bumped postgres version to 14.2.1 (#15713) * Bump oracledb version (#15595) * Bump oracledb version * update reqs * update changelog * Mark one metric as optional (#15719) * Update the test environments (#15644) * Update the test environments * Apply suggestions from code review Co-authored-by: Ofek Lev <ofekmeister@gmail.com> * update metadata.csv --------- Co-authored-by: Ofek Lev <ofekmeister@gmail.com> * [DBM-2685] Fix explaining parameterized queries flood server logs (#15612) * check if query is parameterized before blindly explain then fail * update CHANGELOG * skip explain parameterized query test for pg version < 12 * fix rate limited activity collection test case (#15715) * [DBM-2734] fix test_snapshot_xmin for pg > 13 (#15718) * fix test_snapshot_xmin for pg > 13 * reorder the steps to first collect metrics * remove check.cancel() --------- Co-authored-by: Steven Yuen <steven.yuen@datadoghq.com> Co-authored-by: Andrew Zhang <andrew.zhang@datadoghq.com> Co-authored-by: vivek-datadog <131680079+vivek-datadog@users.noreply.github.com> Co-authored-by: Florent Clarret <florent.clarret@datadoghq.com> Co-authored-by: Ofek Lev <ofekmeister@gmail.com> Co-authored-by: Zhengda Lu <zhengda.lu@datadoghq.com> * update changelog * update changelog * update changelog * remove duplicate changelog entry * update changelog --------- Co-authored-by: boluwaji-deriv <97861462+boluwaji-deriv@users.noreply.github.com> Co-authored-by: Steven Yuen <steven.yuen@datadoghq.com> Co-authored-by: Andrew Zhang <andrew.zhang@datadoghq.com> Co-authored-by: vivek-datadog <131680079+vivek-datadog@users.noreply.github.com> Co-authored-by: Florent Clarret <florent.clarret@datadoghq.com> Co-authored-by: Ofek Lev <ofekmeister@gmail.com>
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.
What does this PR do?
This PR fixes explaining parameterized queries flood server by pre-check if a query is parametrized or not. The pre-check helps us not blindly run explain on a parametrized query that expected to fail.
https://datadoghq.atlassian.net/browse/DBM-2685
Motivation
_explain_parameterized_queries
.ERROR: there is no parameter $1 at character 86
Additional Notes
Review checklist (to be filled by reviewers)
qa/skip-qa
label if the PR doesn't need to be tested during QA.