release-20.2: backup: revalidate restored indexes if added during inc backup #63314
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 1/1 commits from #62701.
/cc @cockroachdb/release
Incremental backups of indexes being built can miss some index entries.
Recent changes mean backup now avoids backing up such an index until it
is complete, but older backups may have these indexes that were caught
mid-backfill. This change identifies indexes that were offline / building
in any layer of the backup and then for those that are to be restored
to a public state, re-runs validation after restore ensure the index
has the expected entries.
Currently if any restored index is missing entries, it is marked offline for
reconstruction post-RESTORE.
Release note (sql change): RESTORE now re-validates restored indexes if they were restored
from an incremental backup that was taken while the index was being created.