Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
backupccl: remove non-remapped system table rows
During restore, we need to remap the values in some system table rows to point to the new IDs of tables, i.e. we need to change the ID of a zone config that applied to the foo table when it had ID 104 to apply to the restored foo table that now has ID 108. However when we do so, we would sometimes see that a row in the restored system table would have an ID which we are not restoring and thus for which we have no remapping. Such rows might correspond to zones for dropped tables or similar. In these cases, the remapping process could fail due to a collision between these old, non-remapped IDs and new, reampped IDs if they were assigned an ID matching the old one. These rows corresponding to IDs not being restored should generally also not be restored, so we can avoid this conflict by simply deleting them during the remapping. The exception to this is rows mentioning IDs below 50, as these are fixed ID system tables that are never remapped; even though they do not appear in the remapping table, rows which mention them should be restored, as-is, as they still mention the same system table in the restored cluster, as these are fixed static IDs. Release note: none. Fixes cockroachdb#88008.
- Loading branch information