Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

sql: show schema change state in sql commands #7554

Closed
vivekmenezes opened this issue Jun 30, 2016 · 9 comments
Closed

sql: show schema change state in sql commands #7554

vivekmenezes opened this issue Jun 30, 2016 · 9 comments
Assignees
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.

Comments

@vivekmenezes
Copy link
Contributor

When a table is being dropped, it still shows up while running show tables

This is part of a more general problem, that during schema changes, change state is not properly visible. commands like show tables; , ``show index` should show useful state.

@knz
Copy link
Contributor

knz commented Jun 30, 2016

@vivekmenezes usually when there is a duplicate issue, the newer issue is deleted and the older one is preserved. Why did you do it the other way around?

@knz
Copy link
Contributor

knz commented Jun 30, 2016

Perhaps related to #7499.

cc @yznming

@vivekmenezes
Copy link
Contributor Author

because this issue correctly classifies the general problem. Thanks for reporting the other issue.

@knz
Copy link
Contributor

knz commented Jun 30, 2016

@vivekmenezes in that take you edit the title and the description of the original issue to make it more general. Again no need to create a new issue.

@petermattis petermattis added this to the Q3 milestone Jul 11, 2016
vivekmenezes added a commit to vivekmenezes/cockroach that referenced this issue Oct 17, 2016
This change writes a checkpoint to the schema change state
within a table descriptor every 10 seconds, so that a node failure
will not restart a schema change from the beginning. A maximum of
10 seconds of work is allowed to get lost.

fixes cockroachdb#7115

will be useful for cockroachdb#7554
vivekmenezes added a commit to vivekmenezes/cockroach that referenced this issue Oct 18, 2016
This change writes a checkpoint to the schema change state
within a table descriptor every 10 seconds, so that a node failure
will not restart a schema change from the beginning. A maximum of
10 seconds of work is allowed to be lost.

Added a new schema change knob: RunBeforeBackfillChunk which is
a function that gets called before the application of each backfill
chunk.

fixes cockroachdb#7115

will be useful for cockroachdb#7554
@vivekmenezes vivekmenezes assigned mrtracy and unassigned jordanlewis Dec 12, 2016
@vivekmenezes vivekmenezes assigned vivekmenezes and unassigned mrtracy Mar 17, 2017
@vivekmenezes
Copy link
Contributor Author

This work will involve moving the schema change checkpointing to use system.jobs table and developing sql commands to query system.jobs.

@benesch because some of his work is related.

@knz
Copy link
Contributor

knz commented Mar 30, 2017 via email

@vivekmenezes
Copy link
Contributor Author

Not sure what you mean. We should at a minimum populate the system.jobs table with the state of a schema change backfill job, so that users can query the system.jobs table for the state of a backfill job. We can start by adding an entry, updating the entry with every state change made by the state machine, write checkpoints and % progress as checkpoints are written.

@jordanlewis jordanlewis assigned maddyblue and unassigned jordanlewis Apr 25, 2018
@jordanlewis jordanlewis added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-bulkio-schema-changes labels Apr 25, 2018
@knz
Copy link
Contributor

knz commented Apr 27, 2018

I think SHOW TABLES does not show dropped tables any more. Not sure what remains to be done here.

@knz knz added the S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption. label Apr 27, 2018
@vivekmenezes
Copy link
Contributor Author

I'm going to close this issue. Users can query the jobs table for any state they may need.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.
Projects
None yet
Development

No branches or pull requests

6 participants