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: upgrade: remove buggy TTL repair #110500

Merged
merged 3 commits into from Sep 13, 2023
Merged

release-23.1: upgrade: remove buggy TTL repair #110500

merged 3 commits into from Sep 13, 2023

Conversation

ecwall
Copy link
Contributor

@ecwall ecwall commented Sep 12, 2023

Backport 2/2 commits from #110364 and #110816.

/cc @cockroachdb/release


Fixes #110363

The TTL descriptor repair in FirstUpgradeFromReleasePrecondition incorrectly
removes TTL fields from table descriptors after incorrectly comparing the
table descriptor's TTL job schedule ID to a set of job IDs.

This change removes the repair until tests are properly added.

Release note (bug fix): Remove buggy TTL descriptor repair. Previously,
upgrading from 22.2.X to 23.1.9 incorrectly removed TTL storage params from
tables (visible via SHOW CREATE TABLE <ttl-table>;) while attempting to
repair table descriptors. This resulted in the node that attempts to run the
TTL job crashing due to a panic caused by the missing TTL storage params.
Clusters currently on 22.2.X should NOT be upgraded to 23.1.9 and should
be upgraded to 23.1.10 or later directly.

Release justification: Backport to base extraordinary release 23.1.10 on.

@ecwall ecwall requested a review from a team as a code owner September 12, 2023 20:19
@blathers-crl
Copy link

blathers-crl bot commented Sep 12, 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 added the backport Label PR's that are backports to older release branches label Sep 12, 2023
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

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

nit: let's add an additional change to this backport. it should use an environment variable to make this function return early by default:

func FirstUpgradeFromReleasePrecondition(

upgrade all

query B retry
SELECT version LIKE '%23.1-%' FROM [SHOW CLUSTER SETTING version]
Copy link
Collaborator

Choose a reason for hiding this comment

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

in the backport, this should be LIKE '%22.2-%'

Copy link
Contributor Author

@ecwall ecwall left a comment

Choose a reason for hiding this comment

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

Added

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @rafiss)


pkg/sql/logictest/testdata/logic_test/mixed_version_upgrade_repair_descriptors line 11 at r2 (raw file):

Previously, rafiss (Rafi Shamim) wrote…

in the backport, this should be LIKE '%22.2-%'

Done

`upgrade all` upgrades all nodes in the cluster. It has the same behavior as
using `upgrade <idx>` for each index in the cluster.

Release note: None
Fixes #110363

The TTL descriptor repair in FirstUpgradeFromReleasePrecondition incorrectly
removes TTL fields from table descriptors after incorrectly comparing the
table descriptor's TTL job schedule ID to a set of job IDs.

This change removes the repair until tests are properly added.

Release note (bug fix): Remove buggy TTL descriptor repair. Previously,
upgrading from 22.2.X to 23.1.9 incorrectly removed TTL storage params from
tables (visible via `SHOW CREATE TABLE <ttl-table>;`) while attempting to
repair table descriptors. This resulted in the node that attempts to run the
TTL job crashing due to a panic caused by the missing TTL storage params.
Clusters currently on 22.2.X should NOT be upgraded to 23.1.9 and should
be upgraded to 23.1.10 or later directly.
This short-circuits FirstUpgradeFromReleasePrecondition and is false by
default. It has been added to 23.1 releases to prevent automatic descriptor
repair on start up until more test coverage is added.

Release note: None
Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

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

nice, lgtm!

@ecwall ecwall merged commit f1d06a2 into cockroachdb:release-23.1 Sep 13, 2023
6 checks passed
@rafiss
Copy link
Collaborator

rafiss commented Sep 13, 2023

blathers backport 23.1.11-rc

@celiala
Copy link
Collaborator

celiala commented Sep 13, 2023

blathers backport staging-v23.1.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Label PR's that are backports to older release branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants