-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: fix nil pointer error in RunPostDeserializationChanges #76198
Conversation
In some restore paths, the privilegeDescriptor would be nil in RunPostDeserializationChanges, avoid doing work on a nil pointer. Release note: None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @ajwerner and @RichardJCai)
pkg/sql/catalog/dbdesc/database_desc_builder.go, line 100 at r1 (raw file):
) (hasChanged bool) { // If privileges are nil, there is nothing to convert. // This case can happen during restore where privileges are not yet created.
I wish I understood this. Why does this happen? Can we fix it in the restore side?
I'll dig into this more, wanted to unblock some restore tests locally on master. Here's an example of the stacktrace thats erroring.
seems like for whatever reason, |
Thanks! bors r+ |
Build succeeded: |
In some restore paths, the privilegeDescriptor would be nil in
RunPostDeserializationChanges, avoid doing work on a nil pointer.
Release note: None
Fixes #76063
Fixes #76062
Fixes #76042