diff --git a/docs/generated/settings/settings-for-tenants.txt b/docs/generated/settings/settings-for-tenants.txt index 8dc8b830cb1a..7f3e73e5b22d 100644 --- a/docs/generated/settings/settings-for-tenants.txt +++ b/docs/generated/settings/settings-for-tenants.txt @@ -300,4 +300,4 @@ trace.jaeger.agent string the address of a Jaeger agent to receive traces using trace.opentelemetry.collector string address of an OpenTelemetry trace collector to receive traces using the otel gRPC protocol, as :. If no port is specified, 4317 will be used. trace.span_registry.enabled boolean true if set, ongoing traces can be seen at https:///#/debug/tracez trace.zipkin.collector string the address of a Zipkin instance to receive traces, as :. If no port is specified, 9411 will be used. -version version 1000022.1-76 set the active cluster version in the format '.' +version version 1000022.2-2 set the active cluster version in the format '.' diff --git a/docs/generated/settings/settings.html b/docs/generated/settings/settings.html index c3f584a22988..53d8146bbc0e 100644 --- a/docs/generated/settings/settings.html +++ b/docs/generated/settings/settings.html @@ -234,6 +234,6 @@ trace.opentelemetry.collectorstringaddress of an OpenTelemetry trace collector to receive traces using the otel gRPC protocol, as :. If no port is specified, 4317 will be used. trace.span_registry.enabledbooleantrueif set, ongoing traces can be seen at https:///#/debug/tracez trace.zipkin.collectorstringthe address of a Zipkin instance to receive traces, as :. If no port is specified, 9411 will be used. -versionversion1000022.1-76set the active cluster version in the format '.' +versionversion1000022.2-2set the active cluster version in the format '.' diff --git a/pkg/ccl/logictestccl/testdata/logic_test/crdb_internal_tenant b/pkg/ccl/logictestccl/testdata/logic_test/crdb_internal_tenant index 770f2a70bc9a..6d14ccb90af7 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/crdb_internal_tenant +++ b/pkg/ccl/logictestccl/testdata/logic_test/crdb_internal_tenant @@ -349,7 +349,7 @@ select crdb_internal.get_vmodule() query T select regexp_replace(regexp_replace(crdb_internal.node_executable_version()::string, '(-\d+)?$', ''), '10000', ''); ---- -22.1 +22.2 query ITTT colnames select node_id, component, field, regexp_replace(regexp_replace(value, '^\d+$', ''), e':\\d+', ':') as value from crdb_internal.node_runtime_info @@ -442,7 +442,7 @@ select * from crdb_internal.gossip_alerts query T select regexp_replace(regexp_replace(crdb_internal.node_executable_version()::string, '(-\d+)?$', ''), '10000', ''); ---- -22.1 +22.2 user root diff --git a/pkg/clusterversion/cockroach_versions.go b/pkg/clusterversion/cockroach_versions.go index 6d5a77d5076f..036de63fa0bb 100644 --- a/pkg/clusterversion/cockroach_versions.go +++ b/pkg/clusterversion/cockroach_versions.go @@ -306,6 +306,14 @@ const ( // heuristics to identify invalid table descriptors for userfile-related // descriptors. FixUserfileRelatedDescriptorCorruption + + // V22_2 is CockroachDB v22.2. It's used for all v22.2.x patch releases. + V22_2 + + // V23_1_Start demarcates the start of cluster versions stepped through during + // the process of upgrading from 22.2 to 23.1. + V23_1Start + // ************************************************* // Step (1): Add new versions here. // Do not add new versions to a patch release. @@ -496,6 +504,14 @@ var rawVersionsSingleton = keyedVersions{ Key: FixUserfileRelatedDescriptorCorruption, Version: roachpb.Version{Major: 22, Minor: 1, Internal: 76}, }, + { + Key: V22_2, + Version: roachpb.Version{Major: 22, Minor: 2, Internal: 0}, + }, + { + Key: V23_1Start, + Version: roachpb.Version{Major: 22, Minor: 2, Internal: 2}, + }, // ************************************************* // Step (2): Add new versions here. // Do not add new versions to a patch release. @@ -544,6 +560,14 @@ var versionsSingleton = func() keyedVersions { return rawVersionsSingleton }() +// V23_1 is a placeholder that will eventually be replaced by the actual 23.1 +// version Key, but in the meantime it points to the latest Key. The placeholder +// is defined so that it can be referenced in code that simply wants to check if +// a cluster is running 23.1 and has completed all associated migrations; most +// version gates can use this instead of defining their own version key if all +// simply need to check is that the cluster has upgraded to 23.1. +var V23_1 = versionsSingleton[len(versionsSingleton)-1].Key + // TODO(irfansharif): clusterversion.binary{,MinimumSupported}Version // feels out of place. A "cluster version" and a "binary version" are two // separate concepts. diff --git a/pkg/clusterversion/key_string.go b/pkg/clusterversion/key_string.go index 977ec8f35af8..0e7c1b0a1c6e 100644 --- a/pkg/clusterversion/key_string.go +++ b/pkg/clusterversion/key_string.go @@ -48,11 +48,13 @@ func _() { _ = x[EnableLeaseUpgrade-36] _ = x[SupportAssumeRoleAuth-37] _ = x[FixUserfileRelatedDescriptorCorruption-38] + _ = x[V22_2-39] + _ = x[V23_1Start-40] } -const _Key_name = "invalidVersionKeyV22_1Start22_2LocalTimestampsPebbleFormatSplitUserKeysMarkedCompactedEnsurePebbleFormatVersionRangeKeysEnablePebbleFormatVersionRangeKeysTrigramInvertedIndexesRemoveGrantPrivilegeMVCCRangeTombstonesUpgradeSequenceToBeReferencedByIDSampledStmtDiagReqsAddSSTableTombstonesSystemPrivilegesTableEnablePredicateProjectionChangefeedAlterSystemSQLInstancesAddLocalitySystemExternalConnectionsTableAlterSystemStatementStatisticsAddIndexRecommendationsRoleIDSequenceAddSystemUserIDColumnSystemUsersIDColumnIsBackfilledSetSystemUsersUserIDColumnNotNullSQLSchemaTelemetryScheduledJobsSchemaChangeSupportsCreateFunctionDeleteRequestReturnKeyPebbleFormatPrePebblev1MarkedRoleOptionsTableHasIDColumnRoleOptionsIDColumnIsBackfilledSetRoleOptionsUserIDColumnNotNullUseDelRangeInGCJobWaitedForDelRangeInGCJobRangefeedUseOneStreamPerNodeNoNonMVCCAddSSTableGCHintInReplicaStateUpdateInvalidColumnIDsInSequenceBackReferencesTTLDistSQLPrioritizeSnapshotsEnableLeaseUpgradeSupportAssumeRoleAuthFixUserfileRelatedDescriptorCorruption" +const _Key_name = "invalidVersionKeyV22_1Start22_2LocalTimestampsPebbleFormatSplitUserKeysMarkedCompactedEnsurePebbleFormatVersionRangeKeysEnablePebbleFormatVersionRangeKeysTrigramInvertedIndexesRemoveGrantPrivilegeMVCCRangeTombstonesUpgradeSequenceToBeReferencedByIDSampledStmtDiagReqsAddSSTableTombstonesSystemPrivilegesTableEnablePredicateProjectionChangefeedAlterSystemSQLInstancesAddLocalitySystemExternalConnectionsTableAlterSystemStatementStatisticsAddIndexRecommendationsRoleIDSequenceAddSystemUserIDColumnSystemUsersIDColumnIsBackfilledSetSystemUsersUserIDColumnNotNullSQLSchemaTelemetryScheduledJobsSchemaChangeSupportsCreateFunctionDeleteRequestReturnKeyPebbleFormatPrePebblev1MarkedRoleOptionsTableHasIDColumnRoleOptionsIDColumnIsBackfilledSetRoleOptionsUserIDColumnNotNullUseDelRangeInGCJobWaitedForDelRangeInGCJobRangefeedUseOneStreamPerNodeNoNonMVCCAddSSTableGCHintInReplicaStateUpdateInvalidColumnIDsInSequenceBackReferencesTTLDistSQLPrioritizeSnapshotsEnableLeaseUpgradeSupportAssumeRoleAuthFixUserfileRelatedDescriptorCorruptionV22_2V23_1Start" -var _Key_index = [...]uint16{0, 17, 22, 31, 46, 86, 120, 154, 176, 196, 215, 248, 267, 287, 308, 343, 377, 407, 460, 474, 495, 526, 559, 590, 624, 646, 675, 702, 733, 766, 784, 808, 836, 855, 875, 921, 931, 950, 968, 989, 1027} +var _Key_index = [...]uint16{0, 17, 22, 31, 46, 86, 120, 154, 176, 196, 215, 248, 267, 287, 308, 343, 377, 407, 460, 474, 495, 526, 559, 590, 624, 646, 675, 702, 733, 766, 784, 808, 836, 855, 875, 921, 931, 950, 968, 989, 1027, 1032, 1042} func (i Key) String() string { i -= -1 diff --git a/pkg/sql/logictest/testdata/logic_test/crdb_internal b/pkg/sql/logictest/testdata/logic_test/crdb_internal index d5b4d00c469a..07cbeb77f6cd 100644 --- a/pkg/sql/logictest/testdata/logic_test/crdb_internal +++ b/pkg/sql/logictest/testdata/logic_test/crdb_internal @@ -534,7 +534,7 @@ select crdb_internal.get_vmodule() query T select regexp_replace(crdb_internal.node_executable_version()::string, '(-\d+)?$', ''); ---- -1000022.1 +1000022.2 query ITTT colnames select node_id, component, field, regexp_replace(regexp_replace(value, '^\d+$', ''), e':\\d+', ':') as value from crdb_internal.node_runtime_info @@ -693,7 +693,7 @@ select * from crdb_internal.node_inflight_trace_spans query T select regexp_replace(crdb_internal.node_executable_version()::string, '(-\d+)?$', ''); ---- -1000022.1 +1000022.2 user root @@ -1187,4 +1187,4 @@ true user root statement ok -REVOKE SYSTEM MODIFYCLUSTERSETTING FROM testuser \ No newline at end of file +REVOKE SYSTEM MODIFYCLUSTERSETTING FROM testuser