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-23.1: fix flakes inside TestRandomSyntaxFunctions #108995

Merged
merged 4 commits into from
Aug 18, 2023

Conversation

fqazi
Copy link
Collaborator

@fqazi fqazi commented Aug 18, 2023

These changes backport fixes from master eliminate flakes for TestRandomSyntaxFunctions on this branch

Backport:

Please see individual PRs for details.

/cc @cockroachdb/release

Release justification: low risk fixes to get testing stable

Fixes: #107928

fqazi added 3 commits August 18, 2023 10:26
Previously, the function: revalidate_unique_constraints_in_all_tables
did not properly check for cancellation when looping over all
descriptors. This could just lead to a delayed cancellation or
timeouts in tests. To address this, this patch updates
the logic to check for cancellations while loop over
descriptors.

Fixes: cockroachdb#107410, cockroachdb#107411

Release note: None
Previously, the TestRandomSyntaxFunctions could invoke
crdb_internal.gen_rand_ident with random arguments,
which could be giant number of random identifiers.
To address this, this patch will avoid validating
this function.

Release note: None
Previously, this test could depending on the concurrency,
could spawn a large number of schema telemetry jobs via
(ctdb_internal.create_sql_schema_telemetry_job).
This could lead to contention that will eventually
cause this test to time out. To address this, this
patch limits calling the telemetry job creation function.

Fixes: cockroachdb#108153

Release note: None
@blathers-crl
Copy link

blathers-crl bot commented Aug 18, 2023

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?

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rafiss
Copy link
Collaborator

rafiss commented Aug 18, 2023

Nice! just a heads up that we also need to backport to the release-23.1.9-rc branch (#108650)

Previously, the code for creating and waiting for the
job inside CREATE STATISTICs had a race condition, where
we could end up using context after a tracing span was
cleaned up on it. To address this, this patch adjusts
the code to wait for a go routine to clean up before,
returning and allowing the span to clean up.

Epic: none

Release note: None
@fqazi fqazi force-pushed the backport23.1-107491-108525 branch from 3072c76 to 11f3d6f Compare August 18, 2023 14:41
@rafiss rafiss marked this pull request as ready for review August 18, 2023 17:35
@rafiss rafiss requested review from a team as code owners August 18, 2023 17:35
@rafiss rafiss requested review from cucaroach and removed request for a team August 18, 2023 17:35
@rafiss rafiss merged commit 33bd089 into cockroachdb:release-23.1 Aug 18, 2023
@michae2
Copy link
Collaborator

michae2 commented Aug 18, 2023

Gah, now that we've merged this I think #109007 needs to become a blocker for 23.1.

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.

4 participants