Skip to content

Commit

Permalink
Merge pull request #127010 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-23.1.24-rc-126905

release-23.1.24-rc: workload/schemachange: handle desc ID generator errors
  • Loading branch information
rafiss authored Jul 11, 2024
2 parents fbcb992 + 08bc520 commit b9b86f7
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 b9b86f7

Please sign in to comment.