Skip to content

Commit

Permalink
Merge pull request #126905 from fqazi/workloadIdGeneratorErr
Browse files Browse the repository at this point in the history
release-23.1: workload/schemachange: handle desc ID generator errors
  • Loading branch information
fqazi authored Jul 10, 2024
2 parents 935b3d4 + 3d2aca6 commit 0c096d6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/workload/schemachange/operation_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -3414,6 +3414,15 @@ func (og *operationGenerator) createSchema(ctx context.Context, tx pgx.Tx) (*opS
if schemaExists && !ifNotExists {
opStmt.expectedExecErrors.add(pgcode.DuplicateSchema)
}
// Descriptor ID generator may be temporarily unavailable, so
// allow uncategorized errors temporarily.
potentialDescIDGeneratorError, err := maybeExpectPotentialDescIDGenerationError(ctx, tx)
if err != nil {
return nil, err
}
codesWithConditions{
{code: pgcode.Uncategorized, condition: potentialDescIDGeneratorError},
}.add(opStmt.potentialExecErrors)

// TODO(jayshrivastava): Support authorization
stmt := randgen.MakeSchemaName(ifNotExists, schemaName, tree.MakeRoleSpecWithRoleName(username.RootUserName().Normalized()))
Expand Down

0 comments on commit 0c096d6

Please sign in to comment.