Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
62278: backupccl: mark type descs as dropped if there is a failure in restore r=ajwerner,pbardea a=arulajmani Previously, when cleaning up type descriptors from a failed restore, we would directly delete the system.descriptor entry. This is bad because writing directly to the system.descriptor table means we bypass the descriptor collection, which doesn't know these descriptors have been dropped. The descriptor collection validates all uncommitted descriptors before writing them. As the descriptor collection doesn't know type descriptors have been dropped, validating cross references was always bound to fail. Put another way, if a restore from a backup which contained user defined types failed for any reason, we were bound to require manual cleanup. This patch fixes this problem by going through the descriptor collection and writing the descriptor in DROPPED state in addition to deleting the system.descriptor entry. Release note (bug fix): Fixed a bug where a failed restore from a backup including user defined types would require manual cleanup. Co-authored-by: arulajmani <[email protected]>
- Loading branch information