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

release-22.1: sql: add COPY to sampled_query logging #87091

Merged

Conversation

otan
Copy link
Contributor

@otan otan commented Aug 30, 2022

Backport (combined into one commit):

Release justification: telemetry only change

/cc @cockroachdb/release

@otan otan requested review from rafiss and a team August 30, 2022 03:30
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@otan otan force-pushed the backport22.1-86627-86870 branch from 91eb44d to 55a29d0 Compare August 30, 2022 03:30
@otan
Copy link
Contributor Author

otan commented Aug 30, 2022

blathers backport 21.2

@otan otan changed the title sql: add COPY to sampled_query logging release-22.1: sql: add COPY to sampled_query logging Aug 30, 2022
@otan otan force-pushed the backport22.1-86627-86870 branch 2 times, most recently from 48d1cad to 8bf5c77 Compare August 30, 2022 04:37
As requested by product, we want COPY to show up on sampled_query. This
commit adds this, whilst fudging a few things presumably more relevant
to "regular" DDL statements.

Release justification: telemetry only change
Release note: None
@rafiss
Copy link
Collaborator

rafiss commented Aug 30, 2022

do you know if the timing bug affects 22.1 also? should i backport #86991?

Previously, we relied on the `txn` being filled to log `COPY`
statements. This is however inaccurate - `txn` may be nil if `COPY` is
the first statement encountered. This meant that the first COPY
encountered would not be logged.

Instead, plumb down `isCopy` and use `timeutil.Now()` if it is a COPY
related statement.

Release justification: logging related critical fix

Release note: None
@otan otan force-pushed the backport22.1-86627-86870 branch from 8bf5c77 to c5f5d50 Compare August 30, 2022 21:55
@otan
Copy link
Contributor Author

otan commented Aug 30, 2022

do you know if the timing bug affects 22.1 also? should i backport #86991?

v22.1 is fine!

@otan otan merged commit 7b0605f into cockroachdb:release-22.1 Sep 2, 2022
@otan otan deleted the backport22.1-86627-86870 branch September 2, 2022 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants