-
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
release-20.2: DROP DATABASE causes ERROR: descriptor not found #62281
Comments
Use only one thread due to cockroachdb/cockroach#62281.
I can reliably reproduce the issue when executing |
Interesting, thanks for the additional info. It's possible that JDBC is issuing the problematic queries on its own. I'm going to try to repoduce and log all queries hitting the cluster to see if that provides any clues. cc @rafiss for visibility |
I'm able to reliably reproduce as well. I've attached some of the logs collected during the reproduction. Nothing stood out to me, but maybe there is some useful info in there? I can collect more information while reproducing if it'd be helpful. cockroach-sql-exec.log cc @ajwerner incase he has any ideas Reproduction Steps1. Start a CockroachDB v20.2.6 single-node cluster and add a
|
Ack, with a repro this should be easy enough to track down. I'll take a look in a bit. |
@ajwerner any idea when you'll have a chance to look into this? |
Sorry, slipped through the cracks, I'll prioritize it and try to have something to say by tomorrow. |
Well this ended up being quite far from where I expected it to be. It also is fixed on 21.1 and master in #60775 (perhaps not totally intentionally). All in all, one of those 2-char code diffs: --- a/pkg/sql/create_view.go
+++ b/pkg/sql/create_view.go
@@ -176,7 +176,7 @@ func (n *createViewNode) startExec(params runParams) error {
privs,
¶ms.p.semaCtx,
params.p.EvalContext(),
- n.persistence,
+ persistence,
) PR inbound once I get 20.2 tests running. |
Fixed by #63781. Will be in the next 20.2.x release. |
Thanks @ajwerner! |
CockroachDB tests were disabled after they revealed a bug in v20.2.6, cockroachdb/cockroach#62281. This bug was fixed and v20.2.8. This commit updates the CockroachDB version and enables the tests.
add more tidb error merssage format checkstyle pass Added some expected TiDB error messages format Update CockroachDB to v20.2.8 and enable tests CockroachDB tests were disabled after they revealed a bug in v20.2.6, cockroachdb/cockroach#62281. This bug was fixed and v20.2.8. This commit updates the CockroachDB version and enables the tests.
add more tidb error merssage format checkstyle pass Added some expected TiDB error messages format Update CockroachDB to v20.2.8 and enable tests CockroachDB tests were disabled after they revealed a bug in v20.2.6, cockroachdb/cockroach#62281. This bug was fixed and v20.2.8. This commit updates the CockroachDB version and enables the tests. Update CockroachDB to v20.2.8 and enable tests CockroachDB tests were disabled after they revealed a bug in v20.2.6, cockroachdb/cockroach#62281. This bug was fixed and v20.2.8. This commit updates the CockroachDB version and enables the tests.
add more tidb error merssage format checkstyle pass Added some expected TiDB error messages format Update CockroachDB to v20.2.8 and enable tests CockroachDB tests were disabled after they revealed a bug in v20.2.6, cockroachdb/cockroach#62281. This bug was fixed and v20.2.8. This commit updates the CockroachDB version and enables the tests. Update CockroachDB to v20.2.8 and enable tests CockroachDB tests were disabled after they revealed a bug in v20.2.6, cockroachdb/cockroach#62281. This bug was fixed and v20.2.8. This commit updates the CockroachDB version and enables the tests.
@ajwerner I just encountered the same error message when running SQLancer against v21.1.3 (I'm trying to upgrade SQLancer to run against v21.1.3 in sqlancer/sqlancer#369) with the same repro steps as above. I noticed that the 2-character change is not included in v21.1. Should it be? It could be that some other bug is causing the same error. I stressed your regression test in #63781 and was unable to get it to fail. |
I recall that code having changed on master at the time which is why I didn't do anything on master. I suspect that it's a different bug. Let me have a look. |
This one turned out to be different, but still related to temporary views! In 21.1 we added a lot of code on properly tracking events in the event log with fully qualified names. Turns out that it can be hard to qualify names of views in other temporary databases. At least, it's hard if you don't keep around more state. See #67104 (which will backport reasonably cleanly). What's nice is that I've been working on a change just today that should have fixed this internally by recognizing that to have gotten here we must have read the schemas for the database and therefore we know what this thing should be called. |
Thanks for the quick response! |
While updating SQLancer to run against Cockroach v20.2.6, SQLancer revealed a bug. Oddly, I'm unable to reproduce the error by manually running the statements that caused it:
The error that SQLancer encounters is:
ERROR: descriptor not found
. The SQLancer test output can be found here.This isn't much information to work with, so I'll try to gather more clues.
Environment:
The text was updated successfully, but these errors were encountered: