release-21.2: backup: include tenant usage data in backup#70829
Merged
RaduBerinde merged 3 commits intocockroachdb:release-21.2from Sep 30, 2021
Merged
release-21.2: backup: include tenant usage data in backup#70829RaduBerinde merged 3 commits intocockroachdb:release-21.2from
RaduBerinde merged 3 commits intocockroachdb:release-21.2from
Conversation
This commit extracts the code that generates the tenant metadata into a separate file. Release note: None Release justification: Part of a larger change that is necessary to fully support backup and restore of non-system tenants. The change only concerns multi-tenant deployments and should not affect single tenant deployments.
We now back up and restore relevant data from tenant_usage: the last token bucket state, and (more importantly) total all-time tenant consumption. The backup manifest proto had to change, but we still support restoring tenant data from older manifests. Release note: None Release justification: This change is necessary to fully support backup and restore of non-system tenants. The change only concerns multi-tenant deployments and should not affect single tenant deployments.
The tenant_usage data is initialized as needed unless it is configured explicitly. This commit adds validation of the tenant in this case, preventing the state from appearing for a deleted tenant. Release note: None Release justification: Part of a larger change that is necessary to fully support backup and restore of non-system tenants. The change only concerns multi-tenant deployments and should not affect single tenant deployments.
|
Thanks for opening a backport. Please check the backport criteria before merging:
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
Add a brief release justification to the body of your PR to justify this backport. Some other things to consider:
|
Member
15 tasks
andy-kimball
approved these changes
Sep 30, 2021
Contributor
andy-kimball
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @ajwerner and @dt)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport 3/3 commits from #70595.
/cc @cockroachdb/release
backup: minor refactoring of tenant backup planning
This commit extracts the code that generates the tenant metadata into
a separate file.
Release note: None
Release justification: Part of a larger change that is necessary to
fully support backup and restore of non-system tenants. The change
only concerns multi-tenant deployments and should not affect single
tenant deployments.
backup: include tenant usage data in backup
We now back up and restore relevant data from tenant_usage: the last
token bucket state, and (more importantly) total all-time tenant
consumption.
The backup manifest proto had to change, but we still support
restoring tenant data from older manifests.
Release note: None
Release justification: This change is necessary to fully support
backup and restore of non-system tenants. The change only concerns
multi-tenant deployments and should not affect single tenant
deployments.
Informs #68479.
tenantcostserver: check tenant when initializing state
The tenant_usage data is initialized as needed unless it is configured
explicitly. This commit adds validation of the tenant in this case,
preventing the state from appearing for a deleted tenant.
Release note: None
Release justification: Part of a larger change that is necessary to
fully support backup and restore of non-system tenants. The change
only concerns multi-tenant deployments and should not affect single
tenant deployments.