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

[nexus] Add a schema change to fix instance counter underflow #5838

Merged
merged 5 commits into from
Jun 6, 2024

Conversation

smklein
Copy link
Collaborator

@smklein smklein commented May 30, 2024

This is a corollary PR to #5830 , which fixed the root cause.

Due to a bug in the virtual provisioning query, it was possible to undercount virtual provisioning information for
instances, which would result in an integer underflow for "total CPU/RAM provisioned" for a {project, silo, fleet}.

Although #5830 fixed the root cause, it's possible that in-field systems have an invalid value if they experienced this bug.

This PR uses a schema change, exploiting the fact that schema changes occur with instances offline, to reset these values to a known value.

@smklein smklein marked this pull request as ready for review May 30, 2024 22:49
@smklein smklein requested a review from gjcolombo June 6, 2024 17:22
Copy link
Contributor

@gjcolombo gjcolombo left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for doing this!

schema/crdb/fix-provisioning-counters/up.sql Outdated Show resolved Hide resolved
@smklein smklein merged commit 4fd9dd2 into main Jun 6, 2024
19 checks passed
@smklein smklein deleted the unbork-counters branch June 6, 2024 19:01
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