Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catalog,tabledesc: tighten Constraint interface definition #91934

Merged
merged 1 commit into from
Nov 16, 2022

Conversation

postamar
Copy link
Contributor

@postamar postamar commented Nov 15, 2022

Informs #91918.

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@postamar postamar force-pushed the constraint-interfaces branch 2 times, most recently from 8855f31 to 2c9661e Compare November 15, 2022 19:58
@@ -2003,13 +2003,13 @@ func (sc *SchemaChanger) maybeReverseMutations(ctx context.Context, causingError
// If the mutation is for validating a constraint that is being added,
// drop the constraint because validation has failed.
if constraint := m.AsConstraint(); constraint != nil && constraint.Adding() {
log.Warningf(ctx, "dropping constraint %+v", constraint.ConstraintToUpdateDesc())
log.Warningf(ctx, "dropping constraint %s", constraint.String())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't call String, as a habit it'll lead to immediate redaction

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@postamar postamar force-pushed the constraint-interfaces branch from 2c9661e to f08db43 Compare November 15, 2022 22:05
@postamar postamar changed the title [WIP] catalog,tabledesc: tighten Constraint interface definition catalog,tabledesc: tighten Constraint interface definition Nov 16, 2022
@postamar postamar marked this pull request as ready for review November 16, 2022 17:20
@postamar postamar requested a review from a team November 16, 2022 17:20
@postamar
Copy link
Contributor Author

Thanks for the review!

bors r+

@craig
Copy link
Contributor

craig bot commented Nov 16, 2022

Build succeeded:

@craig craig bot merged commit 8a3ee4b into cockroachdb:master Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants