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-21.2: sql: add COPY to sampled_query logging #87092

Merged
merged 2 commits into from
Sep 2, 2022

Conversation

blathers-crl[bot]
Copy link

@blathers-crl blathers-crl bot commented Aug 30, 2022

Backport 1/1 commits from #87091 on behalf of @otan.

/cc @cockroachdb/release


Backport (combined into one commit):

Release justification: telemetry only change

/cc @cockroachdb/release


Release justification:

@blathers-crl blathers-crl bot force-pushed the blathers/backport-release-21.2-87091 branch from 7f6d9e8 to 4b44c41 Compare August 30, 2022 03:31
@blathers-crl blathers-crl bot requested a review from rafiss August 30, 2022 03:31
@blathers-crl
Copy link
Author

blathers-crl bot commented Aug 30, 2022

Thanks for opening a backport.

Please check the backport criteria before merging:

  • Patches should only be created for serious issues or test-only changes.
  • Patches should not break backwards-compatibility.
  • Patches should change as little code as possible.
  • Patches should not change on-disk formats or node communication protocols.
  • Patches should not add new functionality.
  • Patches must not add, edit, or otherwise modify cluster versions; or add version gates.
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
  • There is a high priority need for the functionality that cannot wait until the next release and is difficult to address in another way.
  • The new functionality is additive-only and only runs for clusters which have specifically “opted in” to it (e.g. by a cluster setting).
  • New code is protected by a conditional check that is trivial to verify and ensures that it only runs for opt-in clusters.
  • The PM and TL on the team that owns the changed code have signed off that the change obeys the above rules.

Add a brief release justification to the body of your PR to justify this backport.

Some other things to consider:

  • What did we do to ensure that a user that doesn’t know & care about this backport, has no idea that it happened?
  • Will this work in a cluster of mixed patch versions? Did we test that?
  • If a user upgrades a patch version, uses this feature, and then downgrades, what happens?

@blathers-crl blathers-crl bot added blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. labels Aug 30, 2022
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@otan otan force-pushed the blathers/backport-release-21.2-87091 branch from 4b44c41 to 9664392 Compare August 30, 2022 03:36
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
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 blathers/backport-release-21.2-87091 branch from 4f3c599 to a4c5ac9 Compare August 30, 2022 21:59
@otan otan merged commit 2b9f369 into release-21.2 Sep 2, 2022
@otan otan deleted the blathers/backport-release-21.2-87091 branch September 2, 2022 00:09
@otan otan restored the blathers/backport-release-21.2-87091 branch September 2, 2022 00:09
@otan otan deleted the blathers/backport-release-21.2-87091 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
blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants