From dc2d4eaeb48b3c830b3e7c7635ff298492dea377 Mon Sep 17 00:00:00 2001 From: Steven Danna Date: Thu, 20 Jan 2022 09:11:27 +0000 Subject: [PATCH] backupccl: call AllocateIDs after adding index mutations While we expect that all of the index mutations added here to have fully populated IDs and columns. Changes to the AddIndexMutation API will soon require that AllocateIDs is called after any add index mutation. Release note: None --- pkg/ccl/backupccl/restore_job.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/ccl/backupccl/restore_job.go b/pkg/ccl/backupccl/restore_job.go index aad645ab2183..01ce7f34f187 100644 --- a/pkg/ccl/backupccl/restore_job.go +++ b/pkg/ccl/backupccl/restore_job.go @@ -1853,6 +1853,9 @@ func (r *restoreResumer) publishDescriptors( return err } } + if err := mutTable.AllocateIDs(ctx); err != nil { + return err + } allMutDescs = append(allMutDescs, mutTable) newTables = append(newTables, mutTable.TableDesc()) // For cluster restores, all the jobs are restored directly from the jobs