-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: server: get rid of end-user mechanism to enable span configs #70341
release-21.2: server: get rid of end-user mechanism to enable span configs #70341
Conversation
Cluster settings are too easy a switch to reach for to enable the new span configs machinery. Let's gate it behind a necessary envvar as well and use cluster settings to selectively toggle individual components. This commit also fixes a mighty silly bug introduced in cockroachdb#69047; for the two methods we intended to gate use `spanconfig.experimental_kvaccessor.enabled`, we were checking the opposite condition or not checking it at all. Oops. Release note: None Release justification: non-production code changes
We'll repurpose the COCKROACH_EXPERIMENTAL_SPAN_CONFIGS envvar introduced in the previous commit to prevent initializing the span config manager for the host tenant (now truly switching off all span config infrastructure unless explicitly opted into). For both host and secondary tenants, we also want to disable the creation of the span config reconciliation job by default. We introduce `spanconfig.experimental_reconciliation_job.enabled` to that end. --- We re-work some of the controls around when we start the reconciliation job. It was previously possible for a tenant pod to start with a conservative view of it's cluster version setting, decide not to create the reconciliation job, find out about the up-to-date cluster version (introducing the span config job), but only create it when the next `check_interval` timer fired. This was undesirable. We also want to "bounce" the job immediately when the `check_interval` setting is changed. The earlier code didn't quite provide that property. Release justification: non-production code changes Release note: None
Thanks for opening a backport. Please check the backport criteria before merging:
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
Add a brief release justification to the body of your PR to justify this backport. Some other things to consider:
|
(Bump.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 11 of 11 files at r1, 18 of 18 files at r2, 6 of 6 files at r3, all commit messages.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner, @arulajmani, and @irfansharif)
pkg/spanconfig/spanconfigmanager/manager.go, line 157 at r2 (raw file):
select { case <-jobCheckCh: timer.Read = true
Is this correct? Why set .Read
in this case?
pkg/sql/logictest/logic.go, line 463 at r2 (raw file):
// cluster. Connections on behalf of the logic test will go to that tenant. useTenant bool // If true, XXX:
Did you mean to add a comment here?
Accidentally left unfinished in cockroachdb#69658. Release note: None
8255bf7
to
836764c
Compare
The contract for timeutil.Timer indicates that we should only be setting .Read when reading from the timer channel, not unconditionally before a call to .Reset(). Release note: None
It was previously possible for single-tenant clusters to enable the span configs infrastructure by setting COCKROACH_EXPERIMENTAL_SPAN_CONFIGS. For secondary tenants, we actually enabled it by default. We've since decided that the serverless offering intending to use this infrastructure will not be run using the 21.2 release, instead favoring a 22.1 alpha. There's no reason then to leave infrastructure wired up to anything in 21.2. We'll still leave intact the testing knobs enabling this infrastructure, but they're just that -- testing knobs. A more invasive variant of this PR could've deleted all span configs code altogether, but that seems unnecessary (and probably prone to bugs). Release justification: non-production code changes Release note: Non-production code
836764c
to
975531f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner, @arulajmani, and @nvanbenschoten)
pkg/spanconfig/spanconfigmanager/manager.go, line 157 at r2 (raw file):
Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Is this correct? Why set
.Read
in this case?
Hm, looks like I'd misunderstood the timer interface. Sent #70436 and backported here for posterity. All that aside -- this is all non-executable code as of the last commit in this PR.
pkg/sql/logictest/logic.go, line 463 at r2 (raw file):
Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Did you mean to add a comment here?
Yup, tacked on #70232 here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 7 files at r4, 6 of 6 files at r6, all commit messages.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner and @arulajmani)
Backport 2/2 commits from #69658, 1/1 commits from #70232, 1/1 commits from
#70436, + another partially reverting #69658 to disallow end-users from
enabling this infrastructure (though leaving the feature gates intact for
tests).
/cc @cockroachdb/release
It was previously possible for single-tenant clusters to enable the span
configs infrastructure by setting COCKROACH_EXPERIMENTAL_SPAN_CONFIGS. For
secondary tenants, we actually enabled it by default. We've since decided that
the serverless offering intending to use this infrastructure will not be run
using the 21.2 release, instead favoring a 22.1 alpha. There's no reason then
to leave infrastructure wired up to anything in 21.2.
We'll still leave intact the testing knobs enabling this infrastructure, but
they're just that -- testing knobs. A more invasive variant of this PR could've
deleted all span configs code altogether, but that seems unnecessary (and
probably prone to bugs).
Release justification: non-production code changes
Release note: Non-production code