Skip to content
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

MySQL Query Cache Invalidation with comment_propagation #3561

Open
zmariscal opened this issue Mar 27, 2024 · 7 comments
Open

MySQL Query Cache Invalidation with comment_propagation #3561

zmariscal opened this issue Mar 27, 2024 · 7 comments
Assignees
Labels
bug Involves a bug community Was opened by a community member

Comments

@zmariscal
Copy link

Current Behaviour:
When enabling comment_propagation for the mysql2 adapter, we noticed that it invalidates MySQL's query cache. It appears to be potentially linked to a known MySQL issue documented here: MySQL Bug #40986. The specific line in the codebase possibly implicated in this behavior can be found here.

Expected Behaviour:
At the very least, there should be documentation outlining the implications of enabling comment_propagation.

Steps to Reproduce:

Datadog.configure do |c|
    c.tracing.instrument :mysql2, comment_propagation: "full"

Environment:

  • ddtrace version: 1.20.0
  • Ruby version: 3.2.0
@zmariscal zmariscal added bug Involves a bug community Was opened by a community member labels Mar 27, 2024
@TonyCTHsu TonyCTHsu self-assigned this Apr 2, 2024
@TonyCTHsu
Copy link
Contributor

Thanks @zmariscal , I will have a look!

@marcotc
Copy link
Member

marcotc commented Apr 2, 2024

From MySQL Bug #40986:

'/* */'-style comments are fine and do not affect caching.

This is possibly a workaround.

@zmariscal
Copy link
Author

Any update on this issue? Anything I can do to help?

@TonyCTHsu
Copy link
Contributor

From MySQL Bug #40986:

'/* */'-style comments are fine and do not affect caching.

This is possibly a workaround.

This is the current implementation. I am forwarding this to our DBM team.

@sethsamuel
Copy link

sethsamuel commented Jun 24, 2024

Hi @zmariscal, which version of MySQL are you querying and is it self-hosted, Aurora, etc?

@zmariscal
Copy link
Author

Hi @zmariscal, which version of MySQL are you querying and is it self-hosted, Aurora, etc?

The AWS Engine version is as follows: 5.7.mysql_aurora.2.11.2

@sethsamuel
Copy link

Ok, thanks for the report. We've opened a ticket and will get back to you when we know more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Involves a bug community Was opened by a community member
Projects
None yet
Development

No branches or pull requests

4 participants