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: server,autoconfig: automatic configuration via config tasks #101069

Merged
merged 5 commits into from
Apr 10, 2023

Conversation

blathers-crl[bot]
Copy link

@blathers-crl blathers-crl bot commented Apr 10, 2023

Backport:

on behalf of @knz.

/cc @cockroachdb/release


Epic: CRDB-23559
Informs #98431.
All commits but the last are from #98993.

This change introduces "auto config tasks", a mechanism through which
configuration payloads ("tasks") can be injected into a running SQL
service.

This is driven via the "auto config runner" job that was introduced in
the previous commit. The job listens for the arrival of new task
definitions via a Provider interface. When new tasks are known, and
previous tasks have completed, the runner creates a job for the first
next task.

Release note: None


Release justification: unlocks UX for c2c customer preview

This change introduces "auto config tasks", a mechanism through which
configuration payloads ("tasks") can be injected into a running SQL
service.

This is driven via the "auto config runner" job that was introduced in
the previous commit. The job listens for the arrival of new
environment/task definitions via a `Provider` interface. When new
environments are known, it spans "env runner" jobs; each waiting for
its own tasks. When new tasks are known, and previous tasks have
completed, the "env runner" job creates a new separate job for the
first next task.

Release note: None
@blathers-crl blathers-crl bot requested a review from a team April 10, 2023 13:57
@blathers-crl blathers-crl bot requested a review from a team as a code owner April 10, 2023 13:57
@blathers-crl blathers-crl bot force-pushed the blathers/backport-release-23.1-98459 branch from 416beb7 to cb93815 Compare April 10, 2023 13:57
@blathers-crl blathers-crl bot requested review from a team as code owners April 10, 2023 13:57
@blathers-crl
Copy link
Author

blathers-crl bot commented Apr 10, 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?

@blathers-crl blathers-crl bot force-pushed the blathers/backport-release-23.1-98459 branch from dc9a876 to 846eba0 Compare April 10, 2023 13:57
@blathers-crl blathers-crl bot requested review from adityamaru and knz April 10, 2023 13:57
@blathers-crl blathers-crl bot added blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. labels Apr 10, 2023
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@jeffswenson jeffswenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@knz
Copy link
Contributor

knz commented Apr 10, 2023

The CI failure revealed an oversight: #101076

edit: fixed

The calls to Peek and Pop can run concurrently.

Release note: None
knz added 3 commits April 10, 2023 20:41
Before this change, the test was kicking off tasks concurrently with
version upgrades. To reduce noise in logs, this patch fixes it to make
it wait until upgrades have completed.

Release note: None
In the previous PR in this area, while the PR was in-flux we changed
the info key encoding. However, half of the marker API wasn't updated
accordingly.

This patch fixes it.

Release note: None
craig bot pushed a commit that referenced this pull request Apr 10, 2023
100533: workload: jitter the teardown of connections to prevent thundering herd r=sean- a=sean-

This change upgrades workload's use of pgx from v4 to v5 in order to allow jittering the teardown of connections.  This change sets a max connection age of 5min and jitters the teardown by 30s.  Upgrading to pgx v5 also adds non-blocking pgxpool connection acquisition.

workload: add flags to manage the age and lifecycle of connection pool

Add flags to all workload types to specify:

* the max connection age: `--max-conn-lifetime duration`
* the max connection age jitter: `--max-conn-lifetime-jitter duration`
* the max connection idle time: `--max-conn-idle-time duration`
* the connection health check interval: `--conn-healthcheck-period duration`
* the min number of connections in the pool: `--min-conns int`

workload: add support for remaining pgx query modes

Add support for pgx.QueryExecModeCacheDescribe and pgx.QueryExecModeDescribeExec.  Previously, only three of the five query modes were available.

workload: fix race condition when recording histogram data

Release note (cli change): workload jitters teardown of connections to prevent thundering herd impacting P99 latency results.

Release note (cli change): workload utility now has flags to tune the connection pool used for testing.  See `--conn-healthcheck-period`, `--min-conns`, and the `--max-conn-*` flags for details.

Release note (cli change): workload now supports every [PostgreSQL query mode](https://github.com/jackc/pgx/blob/fa5fbed497bc75acee05c1667a8760ce0d634cba/conn.go#L167-L182) available via the underlying pgx driver.

100776: opt: fix ordering-related optimizer panics r=DrewKimball a=DrewKimball

It is possible for some functional-dependency information to be visible to a child operator but invisible to its parent. This could previously cause panics when a child provided an ordering that could be proven to satisfy the required ordering with the child FDs, but not with the parent's FDs.

This patch adds a step to the logic that builds provided orderings that ensures a provided ordering can be proven to respect the required ordering without needing additional FD information. This ensures that a parent never needs to know its child's FDs in order to prove that the provided ordering is correct. The extra step is a no-op in the common case when the provided ordering can already be proven to respect the required ordering.

Informs #85393
Informs #87806
Fixes #96288

Release note (bug fix): Fixed a rare internal error in the optimizer that has existed since before version 22.1, which could occur while enforcing orderings between SQL operators.

101076: autoconfig: prevent a data race in TestAutoConfig r=adityamaru a=knz

Needed for #101069.

The calls to Peek and Pop can run concurrently.

Release note: None
Epic: CRDB-23559

101078: roachtest: move copyfrom test suite to SQL Queries r=srosenberg a=nvanbenschoten

See https://cockroachlabs.slack.com/archives/C0168LW5THS/p1679508254391039.

Epic: None
Release note: None

Co-authored-by: Sean Chittenden <[email protected]>
Co-authored-by: Drew Kimball <[email protected]>
Co-authored-by: Raphael 'kena' Poss <[email protected]>
Co-authored-by: Nathan VanBenschoten <[email protected]>
@knz knz merged commit d42407b into release-23.1 Apr 10, 2023
@knz knz deleted the blathers/backport-release-23.1-98459 branch April 10, 2023 22:41
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