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

clusterversion,migrations,*: remove pre-21.2 cluster versions #74270

Merged
merged 31 commits into from
Dec 30, 2021

Conversation

dt
Copy link
Member

@dt dt commented Dec 24, 2021

This removes all 21.1 to 21.2 cluster versions, as well as the associated cluster version checks, migrations, and migration tests, and then bumps the minimum binary version to 21.2.

Fixes #71708.

@dt dt requested a review from irfansharif December 24, 2021 06:43
@dt dt requested review from a team as code owners December 24, 2021 06:43
@dt dt requested a review from a team December 24, 2021 06:43
@dt dt requested a review from a team as a code owner December 24, 2021 06:43
@dt dt requested review from samiskin and removed request for a team December 24, 2021 06:43
@cockroach-teamcity

This comment has been minimized.

@dt
Copy link
Member Author

dt commented Dec 24, 2021

For the most part, if the gates were just simple if !version.IsActive { return x } or something, I just removed the block, and even if it was a little more complicated, like args = [x]; if version { args = append(args, y) }; foo(args) I still tried to mostly inline it such that it looked natural (i.e. remove that append and make it args = [x, y]).

However for just a couple more complicated cases that were referring to <21.2 versions that needed to be replaced when those were deleted, I added a placeholder clusterversion.TODOPre21_2 alias for 21.2. Replacing those calls with this alias shouldn't change their behavior -- it was already always true, since the code today should never run in a <21.2 cluster -- but means we can delete those older versions in the meantime and then the owners of these bits can decide how to update them.

Copy link
Contributor

@postamar postamar left a comment

Choose a reason for hiding this comment

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

Thanks for doing this. This looks good to me. Just one substantial comment, which might reasonably be considered as out of scope for this change.

Reviewed 88 of 88 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @dt, @irfansharif, and @samiskin)


pkg/sql/logictest/logic.go, line 606 at r1 (raw file):

		disableUpgrade:      true,
	},
	{

Ideally, shouldn't this be replaced by a local-mixed-21.2-22.1? I understand that we don't have a 22.1 version yet and for good reason, but perhaps we could instead redefine this test as

		bootstrapVersion:    clusterversion.TestingBinaryMinSupportedVersion,
		binaryVersion:       clusterversion.TestingBinaryVersion,

and give it a better name? It's not really "mixed" anyway, the name gives the wrong impression; as I understand it, the test's real purpose is to exercise the version gates.


pkg/sql/pgwire/testdata/pgtest/notice, line 58 at r1 (raw file):

CommandComplete
----
{"Severity":"NOTICE","SeverityUnlocalized":"","Code":"00000","Message":"the data for dropped indexes is reclaimed asynchronously","Detail":"","Hint":"The reclamation delay can be customized in the zone configuration for the table.","Position":0,"InternalPosition":0,"InternalQuery":"","Where":"","SchemaName":"","TableName":"","ColumnName":"","DataTypeName":"","ConstraintName":"","File":"drop_index.go","Line":538,"Routine":"dropIndexByName","UnknownFields":null}

If I had a dollar for every time I saw this line number change in a PR...

Copy link
Member Author

@dt dt left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @dt, @irfansharif, @postamar, and @samiskin)


pkg/sql/logictest/logic.go, line 606 at r1 (raw file):

Previously, postamar (Marius Posta) wrote…

Ideally, shouldn't this be replaced by a local-mixed-21.2-22.1? I understand that we don't have a 22.1 version yet and for good reason, but perhaps we could instead redefine this test as

		bootstrapVersion:    clusterversion.TestingBinaryMinSupportedVersion,
		binaryVersion:       clusterversion.TestingBinaryVersion,

and give it a better name? It's not really "mixed" anyway, the name gives the wrong impression; as I understand it, the test's real purpose is to exercise the version gates.

Hm. I'm not sure.

I think it sorta makes sense to delete the X -> Y config and then add a separate new Y -> Z config for new tests rather than having one config that is getPrev() -> getNow() which dynamically resolves its prev and now, because the tests that are using this config are explicitly testing behavior of specifically X to Y, and we delete those tests when the code/behavior they testing is removed after the release.

That said, we could remove this now and then decide later that we do want the dynamic/generic config later so I do think I want to call it out of scope for now.

Copy link
Contributor

@postamar postamar left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @dt, @irfansharif, and @samiskin)


pkg/sql/logictest/logic.go, line 606 at r1 (raw file):

Previously, dt (David Taylor) wrote…

Hm. I'm not sure.

I think it sorta makes sense to delete the X -> Y config and then add a separate new Y -> Z config for new tests rather than having one config that is getPrev() -> getNow() which dynamically resolves its prev and now, because the tests that are using this config are explicitly testing behavior of specifically X to Y, and we delete those tests when the code/behavior they testing is removed after the release.

That said, we could remove this now and then decide later that we do want the dynamic/generic config later so I do think I want to call it out of scope for now.

You're correct, I hadn't fully thought this through.

@celiala
Copy link
Collaborator

celiala commented Dec 29, 2021

Thank you for taking this on, David!

(referencing myself @celiala here so I can follow along and update release process docs/runbooks accordingly)

Copy link
Collaborator

@jbowens jbowens left a comment

Choose a reason for hiding this comment

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

Storage bits :lgtm:

Reviewed 4 of 88 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @dt, @irfansharif, @postamar, and @samiskin)

@dt
Copy link
Member Author

dt commented Dec 30, 2021

TFTRs!

bors r=postamar

@craig
Copy link
Contributor

craig bot commented Dec 30, 2021

Build succeeded:

@craig craig bot merged commit a6a05fd into cockroachdb:master Dec 30, 2021
@dt dt deleted the old-versions branch December 30, 2021 18:27
craig bot pushed a commit that referenced this pull request Aug 12, 2022
85850: importer: support {} format for arrays in CSV r=ecwall a=rafiss

fixes #84631

Release note (sql change): Arrays can now be imported in a CSV file
using the {} format, similar to COPY FROM. Importing array expressions
(e.g. ARRAY[1, 2, 3]) is still supported as well.

85854: clusterversion,storage: remove 22.1 PebbleFormat version gates r=jbowens a=celiala

This commit removes the following 22.1 version gates:

- PebbleFormatBlockPropertyCollector
- PebbleFormatSplitUserKeysMarked

Cleanup was done following guidance from [21.2 cleanup](#74270 (comment)):

> For the most part, if the gates were just simple if !version.IsActive { return x } or something, I just removed the block, and even if it was a little more complicated, like args = [x]; if version { args = append(args, y) }; foo(args) I still tried to mostly inline it such that it looked natural (i.e. remove that append and make it args = [x, y]).

> However for just a couple more complicated cases that were referring to <21.2 versions that needed to be replaced when those were deleted, I added a placeholder clusterversion.TODOPre21_2 alias for 21.2. Replacing those calls with this alias shouldn't change their behavior -- it was already always true, since the code today should never run in a <21.2 cluster -- but means we can delete those older versions in the meantime and then the owners of these bits can decide how to update them.

Partially addresses #80663

Release note: none

85909: kvserver: instrument RaftTransport workers with pprof labels r=tbg,erikgrinaker a=pavelkalinnikov

The unused arguments in the method signature were used to identify goroutines
in traces. This no longer works after Go 1.17 started passing arguments via
registers.

This commit adds pprof labels when starting these goroutines, to have a cleaner
code, more readable traces, and to work around the new Go convention.

Release note: None

85977: grunning: add library for precise on-CPU time measurement r=irfansharif a=irfansharif

Package grunning is a library that's able to retrieve on-CPU running
time for individual goroutines. It relies on using a patched Go and
provides a primitive for fine-grained CPU attribution and control
through a single API:

    package grunning

    // Time returns the time spent by the current goroutine in the
    // running state.
    func Time() time.Duration

The motivating RFC is over at #82356. Informs #82625.
We build CRDB using use the patched Go runtime for all officially
supported platforms when built using Bazel (#84867). Engineers commonly
building CRDB also use happen to use two platforms we don't use a
patched Go for:
- FreeBSD (we don't have cross-compilers setup), and
- M1/M2 Macs (we don't have a code-signing pipeline, yet).
We use '(darwin && arm64) || freebsd || !bazel' as the build tag to
exclude such platforms. See #84867 for more details.

This package tests various properties we should expect over the running time
value. It does not make assertions given the CI environments we run these
under (CPU-starved, lot of OS thread pre-emption, dissimilar to healthy
CRDB deployments). This is also why they're skipped under stress. Still,
these tests are useful to understand the properties we expect running
time to have:

    === RUN   TestEquivalentGoroutines
        thread=03 expected≈10.00% got= 9.98% of on-cpu time
        thread=06 expected≈10.00% got=10.00% of on-cpu time
        thread=02 expected≈10.00% got=10.01% of on-cpu time
        thread=10 expected≈10.00% got=10.01% of on-cpu time
        thread=07 expected≈10.00% got= 9.99% of on-cpu time
        thread=04 expected≈10.00% got= 9.99% of on-cpu time
        thread=09 expected≈10.00% got=10.00% of on-cpu time
        thread=01 expected≈10.00% got= 9.99% of on-cpu time
        thread=08 expected≈10.00% got=10.02% of on-cpu time
        thread=05 expected≈10.00% got=10.02% of on-cpu time
    --- PASS: TestEquivalentGoroutines (0.56s)

    === RUN   TestProportionalGoroutines
        thread=01 got  1.82% of on-cpu time: expected≈ 1.00x got=1.00x
        thread=02 got  3.64% of on-cpu time: expected≈ 2.00x got=2.00x
        thread=03 got  5.47% of on-cpu time: expected≈ 3.00x got=3.00x
        thread=04 got  7.28% of on-cpu time: expected≈ 4.00x got=4.00x
        thread=05 got  9.09% of on-cpu time: expected≈ 5.00x got=4.99x
        thread=06 got 10.91% of on-cpu time: expected≈ 6.00x got=5.99x
        thread=07 got 12.73% of on-cpu time: expected≈ 7.00x got=6.99x
        thread=08 got 14.54% of on-cpu time: expected≈ 8.00x got=7.99x
        thread=09 got 16.36% of on-cpu time: expected≈ 9.00x got=8.99x
        thread=10 got 18.16% of on-cpu time: expected≈10.00x got=9.97x
    --- PASS: TestProportionalGoroutines (1.72s)

    === RUN   TestPingPongHog
        pinger/ponger expected≈1.00x got=0.96x
    --- PASS: TestPingPongHog (0.91s)

Release note: None

85987: sql: fix aggregation of statistics r=maryliag a=maryliag

Previously, because we were using a join, we were double
counting statistics when we had the same fingerprint in
memory and persisted.
This commit adds a `DISTINCT` so we only count them once.

Fixes #85958

Release note: None

86008: sql: logic test to inform maximum builtin function oid change r=chengxiong-ruan a=chengxiong-ruan

This commit adds a logic test to let engineers who added a
new builtin function know that the new builtin function is
constructed earlier than some existing builtin functions at
init time.

Release note: None

Co-authored-by: Rafi Shamim <rafi@cockroachlabs.com>
Co-authored-by: Celia La <celia@cockroachlabs.com>
Co-authored-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
Co-authored-by: irfan sharif <irfanmahmoudsharif@gmail.com>
Co-authored-by: Marylia Gutierrez <marylia@cockroachlabs.com>
Co-authored-by: Chengxiong Ruan <chengxiongruan@gmail.com>
craig bot pushed a commit that referenced this pull request Aug 12, 2022
85095: ui: reintroduce end-to-end UI tests with cypress r=laurenbarker,nathanstilwell,rickystewart,srosenberg a=sjbarag

A recent commit [1] removed the stale, unused end-to-end tests. In their
place, add newly-written tests that can run headlessly in TeamCity (via
Docker) as a quick-failing health check and as a more exhaustive suite.

[1] 3d171b2 (ui: remove unused end-to-end UI tests, 2022-07-25)

Release note: None

85777: clusterversion,kvserver,server,security: remove 22.1 gates r=celiala a=celiala

This commit removes the following 22.1 version gates:

_(✅ denotes explicit LGTM)_

**8/8: initial PR version gates** 
- ✅  kvserver: ProbeRequest, 
- ✅ security,pgwire: SCRAMAuthentication,
- ✅ server: UnsafeLossOfQuorumRecoveryRangeLog,
- ✅ kvserver: AlterSystemProtectedTimestampAddColumn

**8/10 Update: Additionally, these version gates to added to this commit**

- ✅ backupccl: EnableProtectedTimestampsForTenant
- ✅ DeleteCommentsWithDroppedIndexes
- sql/catalog: RemoveIncompatibleDatabasePrivileges
- ✅ kvserver: AddRaftAppliedIndexTermMigration
- ✅ clusterversion: PostAddRaftAppliedIndexTermMigration
- kvserver: DontProposeWriteTimestampForLeaseTransfers
- ~✅ storage: EnablePebbleFormatVersionBlockProperties~ 8/12: TODO in future PR.
- ✅ sql: MVCCIndexBackfiller
- ✅ kvserver: LooselyCoupledRaftLogTruncation
- ✅ sql: EnableDeclarativeSchemaChanger
- ~✅ sql: RowLevelTTL~ 8/12: TODO in future PR.
- kvserver: EnableNewStoreRebalancer
- ~✅ sql: SuperRegions~ 8/12: TODO in future PR.
- ~changefeedccl: EnableNewChangefeedOptions~ 8/12: TODO in future PR.
- ✅ SpanCountTable
- ✅ spanconfig: PreSeedSpanCountTable, SeedSpanCountTable

The cleanup for these version gates was fairly straight-forward, using the guidance from [21.2 cleanup](#74270 (comment)):

> For the most part, if the gates were just simple if !version.IsActive { return x } or something, I just removed the block, and even if it was a little more complicated, like args = [x]; if version { args = append(args, y) }; foo(args) I still tried to mostly inline it such that it looked natural (i.e. remove that append and make it args = [x, y]).

22.1 version gates requiring more nuanced removal will be done in separate PRs.

Partially addresses #80663


Co-authored-by: Sean Barag <barag@cockroachlabs.com>
Co-authored-by: Celia La <celia@cockroachlabs.com>
craig bot pushed a commit that referenced this pull request Aug 19, 2022
85864: clusterversion,kvserver: remove EnableLeaseHolderRemoval r=shralex a=celiala

This commit removes the 22.1 `EnableLeaseHolderRemoval` version gates.

Cleanup was done following guidance from [21.2 cleanup](#74270 (comment)):

> For the most part, if the gates were just simple if !version.IsActive { return x } or something, I just removed the block, and even if it was a little more complicated, like args = [x]; if version { args = append(args, y) }; foo(args) I still tried to mostly inline it such that it looked natural (i.e. remove that append and make it args = [x, y]).

> However for just a couple more complicated cases that were referring to <21.2 versions that needed to be replaced when those were deleted, I added a placeholder clusterversion.TODOPre21_2 alias for 21.2. Replacing those calls with this alias shouldn't change their behavior -- it was already always true, since the code today should never run in a <21.2 cluster -- but means we can delete those older versions in the meantime and then the owners of these bits can decide how to update them.

Partially addresses #80663

Release justification: remove version gate

Release note: none

86153: sql: step the transaction before auto-commit r=ajwerner a=ajwerner

We want the pre-commit validation to see the side-effects of all previous
statements. If we don't step the transaction, we won't see writes which
occurred in the last statement. The shocking thing is that this all worked
before this change. The reason it worked was that the internal executor usage
that happened as a part of logging every schema change resulted in the txn
being stepped. That is a separate, and more complex bug to fix. It will be
described and addressed separately.

Fixes #86132

Release justification: Important bug fix 

Release note: None

86419: ci: disable `verify-archive` CI job r=rail,jlinder a=rickystewart

Release justification: Non-production code changes
Release note: None

86430: logictest: add sort order to logic test r=ajwerner a=adityamaru

Fixes a flakey test that lacked a sort order.

Release note: None

Release justification: test only change to fix a flake

Co-authored-by: Celia La <celia@cockroachlabs.com>
Co-authored-by: Andrew Werner <awerner32@gmail.com>
Co-authored-by: Ricky Stewart <ricky@cockroachlabs.com>
Co-authored-by: Aditya Maru <adityamaru@gmail.com>
craig bot pushed a commit that referenced this pull request Aug 19, 2022
85938: clusterversion,sql: remove ClusterLocksVirtualTable r=AlexTalks a=celiala

This commit removes the 22.1 `ClusterLocksVirtualTable` version gate.

Cleanup was done following guidance from [21.2 cleanup](#74270 (comment)):

> For the most part, if the gates were just simple if !version.IsActive { return x } or something, I just removed the block, and even if it was a little more complicated, like args = [x]; if version { args = append(args, y) }; foo(args) I still tried to mostly inline it such that it looked natural (i.e. remove that append and make it args = [x, y]).

> However for just a couple more complicated cases that were referring to <21.2 versions that needed to be replaced when those were deleted, I added a placeholder clusterversion.TODOPre21_2 alias for 21.2. Replacing those calls with this alias shouldn't change their behavior -- it was already always true, since the code today should never run in a <21.2 cluster -- but means we can delete those older versions in the meantime and then the owners of these bits can decide how to update them.

Partially addresses #80663

Release note: none
Release justification: remove old version gates.

Co-authored-by: Celia La <celia@cockroachlabs.com>
craig bot pushed a commit that referenced this pull request Aug 19, 2022
85419: tracing: fix lazytag export for Jaegar/otel r=aadityasondhi a=aadityasondhi

Previously, lazytags would not render in the otel export to
Jaeger. This was because otel doesn't support an on-demand
nature of the lazytags in its interface.

This change manually adds lazytags as otel tags before an otel
span is finished, allowing them to render in Jaeger after they
are exported.

Resolves: #85166

Release note: None

Release justification: bug fixes

85689: lint: add a linter to prohibit map[...]bool in favor of map[...]struct{} r=yuzefovich a=yuzefovich

The linter is currently limited to `sql/opt/norm` package. This commit
was prompted by an article mentioned in the Golang Weekly newsletter.
The rationale is that `map[...]struct{}` is more efficient, but in some
cases the bool map value is actually desired, so this commit introduces
an opt-out `//nolint:maptobool` comment.

Release justification: low-risk performance improvement.

Release note: None

85939: clusterversion,kvserver,sql: remove AutoStatsTableSettings r=msirek a=celiala

This commit removes the 22.1 `AutoStatsTableSettings` version gate.

Cleanup was done following guidance from [21.2 cleanup](#74270 (comment)):

> For the most part, if the gates were just simple if !version.IsActive { return x } or something, I just removed the block, and even if it was a little more complicated, like args = [x]; if version { args = append(args, y) }; foo(args) I still tried to mostly inline it such that it looked natural (i.e. remove that append and make it args = [x, y]).

> However for just a couple more complicated cases that were referring to <21.2 versions that needed to be replaced when those were deleted, I added a placeholder clusterversion.TODOPre21_2 alias for 21.2. Replacing those calls with this alias shouldn't change their behavior -- it was already always true, since the code today should never run in a <21.2 cluster -- but means we can delete those older versions in the meantime and then the owners of these bits can decide how to update them.

Partially addresses #80663

Release note: None
Release justification: remove old version gates.

86065: admission: carve out some new files r=irfansharif a=irfansharif

Pure code movement. Trying to see what components in this package could be
reasoned about independently to readers less familiar with this package.
Some of these may benefit from being pulled into sub-packages, but for now
separate files are sufficient. We're hurting some git history tracking
with this PR, but hopefully they lead to more understandability with future
work. It's also better to do it now before the release branch is cut to
make backports easier. If we pull them into sub packages next, git tracking
will then come for free.

```
admission: move ioLoadListener into its own file
admission: move GrantCoordinator into its own file
admission: move kvSlotAdjuster into its own file
admission: move sqlNodeCPUOverloadIndicator into its own file
admission: move tokensLinearModel into its own file
admission: add top-level admission.go
admission: move store{AdmissionStats,RequestEstimates}..
admission: segment test files by central type
```

I'm not breaking things up into subpackages in this PR, but this paves the
way for that. The structure I'm imagining is roughly:

    pkg/util/admission/
    ├── admission.go
    ├── admissionpb/
    ├── diskbandwidthlimiter/
    ├── diskloadwatcher/
    ├── grantcoordinator/
    ├── granter/
    ├── ioloadlistener/
    ├── kvslotadjuster/
    ├── sqlcpuoverloadindicator/
    ├── storeworkqueue/
    └── tokenlinearmodel/

Where the sub-packages house concrete implementations of interfaces
defined in admission.go, corresponding tests, and constructors for those
types. They depend on the base level pkg/util/admission package and talk
to the other subpackages through interfaces. The existing interfaces are
already written in a manner to make this happen. For other examples of
this pattern, look at pkg/{upgrade,spanconfig}.

Release justification: low-risk / high-benefit (pure code movement, will make backports easier)


Co-authored-by: Aaditya Sondhi <aadityas@cockroachlabs.com>
Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
Co-authored-by: Celia La <celia@cockroachlabs.com>
Co-authored-by: irfan sharif <irfanmahmoudsharif@gmail.com>
craig bot pushed a commit that referenced this pull request Aug 20, 2022
85158: ccl/backupccl: do not backup spans for views r=rhu713 a=rhu713

Backups currently backup spans corresponding to views. These spans should not
be backed up as they do not contain data.

Additionally, because we do not split ranges at view boundaries, it is possible
that the range the view span belongs to is shared by another object in the
cluster (that we may or may not be backing up) that might have its own bespoke
zone configurations, namely one with a short GC TTL. This could lead to a
situation where the short GC TTL on the range we are not backing up causes our
protectedts verification to fail when attempting to backup the view span.

Release note (bug fix): Fix a bug in backup where spans for views were being
backed up. Because ranges are not split at view boundaries, this can cause the
backup to send export requests to ranges that do not belong to any backup
target.

Release justification: bug fixes and low-risk updates to new functionality

85937: clusterversion,changefeedccl: remove Changefeed version gates r=samiskin a=celiala

This commit removes the 22.1 `ChangefeedIdleness` and `EnableNewChangefeedOptions` version gates.

Cleanup was done following guidance from [21.2 cleanup](#74270 (comment)):

> For the most part, if the gates were just simple if !version.IsActive { return x } or something, I just removed the block, and even if it was a little more complicated, like args = [x]; if version { args = append(args, y) }; foo(args) I still tried to mostly inline it such that it looked natural (i.e. remove that append and make it args = [x, y]).

> However for just a couple more complicated cases that were referring to <21.2 versions that needed to be replaced when those were deleted, I added a placeholder clusterversion.TODOPre21_2 alias for 21.2. Replacing those calls with this alias shouldn't change their behavior -- it was already always true, since the code today should never run in a <21.2 cluster -- but means we can delete those older versions in the meantime and then the owners of these bits can decide how to update them.

Partially addresses #80663

Release note: none
Release justification: remove old version gates.

Co-authored-by: Rui Hu <rui@cockroachlabs.com>
Co-authored-by: Celia La <celia@cockroachlabs.com>
craig bot pushed a commit that referenced this pull request Aug 23, 2022
85825: clusterversion,sql,backupccl: remove PublicSchemasWithDescriptors r=celiala a=celiala

This commit removes the 22.1 version gate `PublicSchemasWithDescriptors`, which was referenced in:

- pkg/ccl/backupccl/
- pkg/ccl/changefeedccl/
- pkg/config/zonepb/zone.go
- pkg/sql/catalog/descs/
- pkg/sql/descriptor.go
- pkg/sql/importer/
- pkg/sql/rename_table.go
- pkg/sql/reparent_database.go

Cleanup was done following guidance from [21.2 cleanup](#74270 (comment)):

> For the most part, if the gates were just simple if !version.IsActive { return x } or something, I just removed the block, and even if it was a little more complicated, like args = [x]; if version { args = append(args, y) }; foo(args) I still tried to mostly inline it such that it looked natural (i.e. remove that append and make it args = [x, y]).

> However for just a couple more complicated cases that were referring to <21.2 versions that needed to be replaced when those were deleted, I added a placeholder clusterversion.TODOPre21_2 alias for 21.2. Replacing those calls with this alias shouldn't change their behavior -- it was already always true, since the code today should never run in a <21.2 cluster -- but means we can delete those older versions in the meantime and then the owners of these bits can decide how to update them.

Partially addresses #80663

Release note: none
Release justification: remove old version gates

86618: distsql: finish the tracing span later in an error case r=yuzefovich a=yuzefovich

Previously, it was possible to run the finished tracing span when
setting up the remote DistSQL flow if that setup encounters an error. In
such a scenario, we need to clean up the resources explicitly, and the
order of that cleanup was incorrect - we would finish the span before
possibly using the context that is still referencing the finished span.
This is now fixed.

Fixes: #86369.

Release justification: bug fix.

Release note: None

Co-authored-by: Celia La <celia@cockroachlabs.com>
Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
craig bot pushed a commit that referenced this pull request Sep 1, 2022
85490: docs-issue-generation: Script can now handle multiple release notes r=nickvigilante a=nickvigilante

Previously, if a commit to the cockroach repo contained multiple
RNs, the docs issue generation script only evaluated the
last release note. Additionally, if the release justification was
included below the last release note in a commit, it would be
included as part of the release note. Now, each release note in a
commit is evaluated, and the release justification is stripped.

Fixes #84434

Release note: None

Release justification: non-production code change

86642: clusterversion,*: remove pre-22.1 cluster versions r=jlinder,benbardin,jbowens,ajwerner a=celiala

This PR removes any remaining pre-22.1 gates and bumps the minimum-supported version on master, which is required in order for us to cut any release for 22.2

The cleanup for these version gates was fairly straight-forward, using the guidance from #74270 (comment):

> For the most part, if the gates were just simple if !version.IsActive { return x } or something, I just removed the block, and even if it was a little more complicated, like args = [x]; if version { args = append(args, y) }; foo(args) I still tried to mostly inline it such that it looked natural (i.e. remove that append and make it args = [x, y]).

Code removed / adjusted, by team-specific areas:

* `TestRestoreOldVersions`: removed `BinaryVersionOverride` reference to old version (cc `@RichardJCai` / `@cockroachdb/bulk-io` )
* Removed `TestVirtualColumnNotAllowedInPkeyBefore22_1` (cc `@cockroachdb/sql-schema` )
* Adjusted `TestSetMinVersion` to account for deprecated version gates (cc `@cockroachdb/storage` )

Fixes #80663
Release note: None
Release justification: bump minSupportedVersion

86739: sql/gcjob: set GC hint when deleting all data in range r=aliher1911 a=aliher1911

When deleting full range spans with range tombstones GC hint
should be set to reduce the work GC does when collecting those
ranges.
This commit add appropriate flag to the request.

Release justification: Enables future optimization for delete range only,
doesn't change current GC or delete range functionality.
Release note: None

87132: builtins: hide multitenancy functions from docs and fix categories r=ecwall a=rafiss

fixes #84846
fixes #84756

In the public docs, we don't show multitenancy-related functions. This
also fixes the category for sql_liveness_is_alive and row_to_json.

Release note: None

Release justification: docs only change

87185: ui: make the warning about performance more prominent r=maryliag a=maryliag

Previously the warning about schema changes affecting
performance was too discrete. This commit adds a warning
component, so the message is more prominent and the user
can see more easily.

<img width="590" alt="Screen Shot 2022-08-31 at 11 20 59 AM" src="https://user-images.githubusercontent.com/1017486/187718454-c82c55a1-ae29-4dee-af78-dc5dbdbb9621.png">



Release justification: low risk change, improve UX
Release note (ui change): Add warning about
performance being affected when executing an index
recommendation.

Co-authored-by: Nick Vigilante <vigilante@cockroachlabs.com>
Co-authored-by: Celia La <celia@cockroachlabs.com>
Co-authored-by: Oleg Afanasyev <oleg@cockroachlabs.com>
Co-authored-by: Rafi Shamim <rafi@cockroachlabs.com>
Co-authored-by: Marylia Gutierrez <marylia@cockroachlabs.com>
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.

clusterversion: bump min-supported version to 21.2
5 participants