-
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: v20.2.0: panic: unexpected node type when constructing plan for ALTER DATABASE _ OWNER TO _ #56861
Comments
cc @RaduBerinde |
Looks like a bug in new functionality (alter owner). Returning cockroach/pkg/sql/alter_database.go Line 48 in 150c591
This probably executes properly by chance. It breaks when the statement is being explained (which happens periodically for all statements). If we want a no-op, we should just return a Repro is very easy:
CC @solongordon |
As part of the fix, please add a |
@otan could you fix this on 20.2? i see that you have been working on alter_database.go recently, so this is fixed in |
this got fixed by @angelapwen in 14c8d36. @angelapwen would you be interested in moving the ownership check into the exec plan like you did in your PR for just v20.2? |
I'll move the ownership check for @RaduBerinde If I understand correctly, returning Line 178 in 81ac191
Did you want a general check for this |
you can't return a plan node which is the fix you introduced was that this bit
moved from |
Yep I understand that bit @otan! I was trying to work out how @RaduBerinde's previous comment above about adding a |
ah missed that comment, sorry! |
57263: sql: raise error if opaque statement receives nil plan node r=RaduBerinde a=angelapwen Addresses #56861. Previously there was no check for a situation in which a planNode was nil. For opaque statements, this resulted in occasional panics when a nil planNode was returned. This commit adds a check for opaque statements to make sure the planNode is not nil before moving on to execution. Release note: None Co-authored-by: angelapwen <angelaw@cockroachlabs.com>
This issue was autofiled by Sentry. It represents a crash or reported error on a live cluster with telemetry enabled.
Sentry link: https://sentry.io/organizations/cockroach-labs/issues/2039644062/?referrer=webhooks_plugin
Panic message:
Stacktrace (expand for inline code snippets):
cockroach/pkg/sql/conn_executor.go
Lines 505 to 507 in 150c591
/usr/local/go/src/runtime/panic.go#L678-L680 in runtime.gopanic
cockroach/pkg/sql/exec_factory_util.go
Lines 43 to 45 in 150c591
cockroach/pkg/sql/exec_factory_util.go
Lines 46 to 48 in 150c591
cockroach/pkg/sql/opt_exec_factory.go
Lines 1025 to 1027 in 150c591
cockroach/pkg/sql/opt/exec/explain/explain_factory.go
Lines 150 to 152 in 150c591
cockroach/pkg/sql/opt/exec/execbuilder/builder.go
Lines 140 to 142 in 150c591
cockroach/pkg/sql/plan_opt.go
Lines 580 to 582 in 150c591
cockroach/pkg/sql/plan_opt.go
Lines 264 to 266 in 150c591
cockroach/pkg/sql/conn_executor_exec.go
Lines 900 to 902 in 150c591
cockroach/pkg/sql/conn_executor_exec.go
Lines 779 to 781 in 150c591
cockroach/pkg/sql/conn_executor_exec.go
Lines 638 to 640 in 150c591
cockroach/pkg/sql/conn_executor_exec.go
Lines 113 to 115 in 150c591
cockroach/pkg/sql/conn_executor.go
Lines 1464 to 1466 in 150c591
cockroach/pkg/sql/conn_executor.go
Lines 1466 to 1468 in 150c591
cockroach/pkg/sql/conn_executor.go
Lines 1390 to 1392 in 150c591
cockroach/pkg/sql/conn_executor.go
Lines 507 to 509 in 150c591
cockroach/pkg/sql/pgwire/conn.go
Lines 625 to 627 in 150c591
/usr/local/go/src/runtime/asm_amd64.s#L1356-L1358 in runtime.goexit
v20.2.0
The text was updated successfully, but these errors were encountered: