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

sql/schmachanger: use more friendly language for fallback #98112

Merged
merged 1 commit into from
Mar 8, 2023

Conversation

fqazi
Copy link
Collaborator

@fqazi fqazi commented Mar 7, 2023

Previously, the declarative schema changer used slightly
alarming language when falling back. To address this,
this patch removes the word failure and uses softer
language. Also, the logging level is reduced to remove
this message by default.

Fixes: #97922

Release note: None

@blathers-crl
Copy link

blathers-crl bot commented Mar 7, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@fqazi fqazi force-pushed the scLessSevereMessages branch from 46c1f5c to 49192c1 Compare March 7, 2023 13:42
@fqazi fqazi marked this pull request as ready for review March 7, 2023 13:43
@fqazi fqazi requested a review from a team March 7, 2023 13:43
@@ -75,7 +75,7 @@ func (el EventLogger) HandlePanicAndLogError(ctx context.Context, err *error) {
log.InfofDepth(ctx, depth, "done %s in %s", el.msg, redact.Safe(timeutil.Since(el.start)))
}
case HasNotImplemented(*err):
log.InfofDepth(ctx, depth, "failed %s with error: %v", el.msg, *err)
log.InfofDepth(ctx, depth, "unsuccessful in %s with message: %v", el.msg, *err)
Copy link
Contributor

Choose a reason for hiding this comment

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

How about something more straightforward likedeclarative schema changer fallback %s with message:, unsuccessful still sounds erroneous heh.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Adjusted to get rid of unsuccessful (the way the strings are joined doesn't help):
falling back from building declarative schema change targets for GRANT with message: ‹*tree.Grant not implemented in the new schema changer›

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just get rid of this log message altogether? I don't think we get a ton of value from it. How about:

log.VEventfDepth(ctx, depth, 1, "declarative schema changer does not support %s: %v", el.msg, *err)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll go with that approach.

@fqazi fqazi force-pushed the scLessSevereMessages branch from 49192c1 to 160d005 Compare March 8, 2023 19:35
Previously, the declarative schema changer used slightly
alarming language when falling back. To address this,
this patch removes the word failure and uses softer
language. Also the logging level is reduced to remove
this message by default.

Fixes: cockroachdb#97922

Release note: None
@fqazi fqazi force-pushed the scLessSevereMessages branch from 160d005 to 420a0aa Compare March 8, 2023 19:56
Copy link
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @chengxiong-ruan)

Copy link
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

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

Let's backport this

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @chengxiong-ruan)

@fqazi
Copy link
Collaborator Author

fqazi commented Mar 8, 2023

@ajwerner TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 8, 2023

Build succeeded:

@craig craig bot merged commit c705d32 into cockroachdb:master Mar 8, 2023
@fqazi
Copy link
Collaborator Author

fqazi commented Mar 8, 2023

blathers backport 22.2

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.

make new schema changer logging less alarming
4 participants