Skip to content

clusterversion,kvserver,server,security: remove 22.1 gates#85777

Merged
craig[bot] merged 16 commits intocockroachdb:masterfrom
celiala:remove-22.1-gates
Aug 12, 2022
Merged

clusterversion,kvserver,server,security: remove 22.1 gates#85777
craig[bot] merged 16 commits intocockroachdb:masterfrom
celiala:remove-22.1-gates

Conversation

@celiala
Copy link
Copy Markdown
Collaborator

@celiala celiala commented Aug 8, 2022

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:

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

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@celiala celiala force-pushed the remove-22.1-gates branch 3 times, most recently from f28e5ba to 6b7cc5d Compare August 9, 2022 09:01
@celiala celiala changed the title clusterversion,kvserver: remove ProbeRequest clusterversion,kvserver,server,security:remove ProbeRequest,SCRAMAuthentication,UnsafeLossOfQuorumRecoveryRangeLog,AlterSystemProtectedTimestampAddColumn Aug 9, 2022
@celiala celiala changed the title clusterversion,kvserver,server,security:remove ProbeRequest,SCRAMAuthentication,UnsafeLossOfQuorumRecoveryRangeLog,AlterSystemProtectedTimestampAddColumn clusterversion,kvserver,server,security:remove 22.1 gates (1) Aug 9, 2022
@celiala celiala force-pushed the remove-22.1-gates branch 3 times, most recently from 6c3d3b8 to 64be12d Compare August 9, 2022 10:08
@celiala celiala changed the title clusterversion,kvserver,server,security:remove 22.1 gates (1) clusterversion,kvserver,server,security:remove 22.1 gates Aug 9, 2022
@celiala celiala marked this pull request as ready for review August 9, 2022 14:02
@celiala celiala requested a review from a team as a code owner August 9, 2022 14:02
@celiala celiala requested a review from a team August 9, 2022 14:02
@celiala celiala requested a review from a team as a code owner August 9, 2022 14:02
@celiala celiala requested review from a team, adityamaru, aliher1911, dt, irfansharif, knz and tbg August 9, 2022 14:02
Copy link
Copy Markdown
Contributor

@knz knz left a comment

Choose a reason for hiding this comment

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

LGTM for the SCRAMAuthentication changes, with a nit.
Didn't review the other changes.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @adityamaru, @aliher1911, @celiala, @dt, @irfansharif, and @tbg)


pkg/sql/pgwire/hba_conf.go line 364 at r4 (raw file):

}

// chainOptions is an option that combines its argument options.

Could you leave these two functions in, if only via a var _ = chainOptions to prevent the linter warning. I believe @kpatron-cockroachlabs will need them in an upcoming PR.

@celiala
Copy link
Copy Markdown
Collaborator Author

celiala commented Aug 9, 2022

@dt @irfansharif - I'm going to remove the version gates in multiple passes, but let me know if version gate removal + bumping minVersion needs to be done more atomically. Thanks!

@celiala celiala force-pushed the remove-22.1-gates branch from 64be12d to 7c4c49d Compare August 9, 2022 15:44
Copy link
Copy Markdown
Contributor

@irfansharif irfansharif left a comment

Choose a reason for hiding this comment

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

They don't need to be done atomically (David and Yahor have been removing other cluster versions in other PRs for ex.)

Copy link
Copy Markdown
Collaborator Author

@celiala celiala left a comment

Choose a reason for hiding this comment

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

TFTR!

Bazel Essential CI is failing for pkg/ccl/serverccl/serverccl_test_/serverccl_test. But I see a history of fails and I don't think this PR impacted the pkg/ccl/serverccl/ area?

Since this is a relatively straight-forward cleanup, and since all other tests pass, I will merge soon to unblock remaining version gate cleanup, if I don't hear from other groups.

8/10 Update: More version gates were added, which are also relatively straight-forward cleanups. I'm going to try to merge this by EOD Thursday or sometime Friday, in order to bump the minVersion, since we select alpha candidate next week.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @adityamaru, @aliher1911, @dt, @kpatron-cockroachlabs, and @tbg)


pkg/sql/pgwire/hba_conf.go line 364 at r4 (raw file):
Done. Added:

var _ = chainOptions
var _ = requireClusterVersion

@celiala celiala force-pushed the remove-22.1-gates branch from fd8958d to 8ddd140 Compare August 12, 2022 14:50
@irfansharif irfansharif changed the title clusterversion,kvserver,server,security:remove 22.1 gates clusterversion,kvserver,server,security: remove 22.1 gates Aug 12, 2022
@celiala celiala force-pushed the remove-22.1-gates branch from 8ddd140 to dc483ab Compare August 12, 2022 16:52
celiala added 16 commits August 12, 2022 09:58
@celiala celiala force-pushed the remove-22.1-gates branch from dc483ab to 0da16b7 Compare August 12, 2022 17:21
@celiala
Copy link
Copy Markdown
Collaborator Author

celiala commented Aug 12, 2022

TFTRs!

bors r+

8/12 Update: These version gate removals were reverted (removed from this PR) to pass tests. To be addressed separately (future PRs):

  • storage: EnablePebbleFormatVersionBlockProperties
  • sql: RowLevelTTL
  • sql: SuperRegions
  • changefeedccl: EnableNewChangefeedOptions

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Aug 12, 2022

Build succeeded:

@craig craig bot merged commit f1c2047 into cockroachdb:master Aug 12, 2022
irfansharif added a commit to irfansharif/cockroach that referenced this pull request Aug 12, 2022
This code was (re-)added in cockroachdb#80190 to version gate the new 22.1 store
rebalancer behavior by keeping the 21.2 one form around. In 22.2 code
though we can and did get rid of the version gate (cockroachdb#85777), so all this
code can be removed.

Release note: None
craig bot pushed a commit that referenced this pull request Aug 13, 2022
86060: kvserver: rm EnableNewStoreRebalancer detritus r=irfansharif a=irfansharif

This code was (re-)added in #80190 to version gate the new 22.1 store
rebalancer behavior by keeping the 21.2 form around. In 22.2 code
though we can and did get rid of the version gate (#85777), so all this
code can be removed.

Release note: None

86064: vendor: bump Pebble to 84fa6a019ed4 r=erikgrinaker,nicktrav a=jbowens

```
84fa6a01 db: add Metrics.Keys.RangeKeySetsCount
f4b082db db: avoid defragmenting beyond prefix bounds during prefix iteration
c135b6df metamorphic: use pointer receiver
```

Release note: None

Co-authored-by: irfan sharif <irfanmahmoudsharif@gmail.com>
Co-authored-by: Jackson Owens <jackson@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.

8 participants