-
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: schema change after server restart blocks once then looks like DB corruption after retry #9493
Comments
cc @andreimatei @dt (the issue does not occur if the table being dropped does not contain FKs) |
NB: after a while (a few minutes), the error disappears. |
After discussing with Andrei:
In any case, once the DROP has been initiated, we should care that a subsequent CREATE TABLE with the same name succeeds without error. Right now the user would see "table has been deleted" upon DROP, and then deduce that it's safe to create, but then CREATE fails with "table already exists.". This is a catastrophic UX failure. |
@dt it would be great if you could expound on the explanation above to clarify where the FK message comes from? |
I'll work on improving sql draining to release those leases... I'm real scared. |
@andreimatei are you really working on releasing those leases. I don't think we should do that for 1.0 |
Vivek I'm not sure whether releasing the leases are the best way to address the issue at hand but the UX problem initially reported here must absolutely be fixed before 1.0 IMO. |
(I've replied this by email 2 days ago, but for some reason it didn't make it in the issue... weird...) I'm not working on it; I gave up after investigating draining a bit and getting in the weeds and realizing it's not very easy and I started bringing it up with Peter and others for getting someone to work on it :) |
Draining table leases when a server is stopped doesn't sound too bad, but then I haven't looked at these weeds recently. Alternately, can we clear any previously held table leases when a server restarts? Re: double DROP of a table. All of the proposed UX options sound reasonable. This sounds like the easiest short term fix:
|
I'm not working on it; I gave up after investigating draining a bit and On Fri, Oct 21, 2016 at 5:36 PM, vivekmenezes notifications@github.com
|
With all our schema changes being chunked now we certainly can reduce the On Sun, Oct 23, 2016, 2:44 PM Andrei Matei notifications@github.com wrote:
|
@knz do let me know what you'd like to see besides what I've done in On Sat, Oct 22, 2016 at 4:41 AM kena notifications@github.com wrote:
|
I think we want an early return in |
Steps:
rm -rf cockroach-data; ./cockroach start --background
./cockroach gen example-data startrek | ./cockroach sql
killall cockroach
- wait for the server to finish shutting down./cockroach start --background
pq: missing fk back reference to quotes.quotes_episode_idx from episodes.primary
)From that point forward the db cannot be used but also cannot be deleted.
The text was updated successfully, but these errors were encountered: