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

[Upgrades] Support preparing upgrade while still up #7718

Merged
merged 4 commits into from
Sep 6, 2024
Merged

Conversation

msullivan
Copy link
Member

@msullivan msullivan commented Sep 6, 2024

This requires splitting up "preparing" the upgrade (which populates
the new namespaces) and "finalizing" the upgrade (which flips all the
trampolines and performs schema fixups).

This also does some more work towards making the upgrade recoverable
(by running the finalizations in transactions, and not committing any until
all are ready), but there are still important TODOs on that front.

Progress on #6697.

@msullivan msullivan changed the title [Upgrade] Support preparing upgrade while still up [Upgrades] Support preparing upgrade while still up Sep 6, 2024
Copy link
Member

@elprans elprans left a comment

Choose a reason for hiding this comment

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

We should probably also add a way to abort/clean-up non-finalized upgrades?

@msullivan
Copy link
Member Author

We should probably also add a way to abort/clean-up non-finalized upgrades?

Yeah, that will be in one of the next follow-ups.

The tests are failing with "out of shared memory" while trying to finalize on github actions. Probably holding open all these huge transactions won't actually fly.
I'm just removing that mechanism for now, and will address the issue in a follow-up.

I think the new plan will be to try each finalization migration in a transaction that we rollback, and then once they have been validated we will apply them all. (We could maybe support both modes, too?) I'll also make it so that we compile the script for it in the preparation phase and stash it in the database, so we don't have any compiler overhead in the finalization critical section.

This requires splitting up "preparing" the upgrade (which populates
the new namespaces) and "finalizing" the upgrade (which flips all the
trampolines and performs schema fixups).

Progress on #6697.
@msullivan msullivan merged commit bed0b65 into master Sep 6, 2024
26 checks passed
@msullivan msullivan deleted the A-inplace-3 branch September 6, 2024 21:18
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.

2 participants