-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Comments
@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? |
because this issue correctly classifies the general problem. Thanks for reporting the other issue. |
@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. |
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
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
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. |
Note that this data is already shown in one of the virtual tables in crdb_internal.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
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. |
I think |
I'm going to close this issue. Users can query the jobs table for any state they may need. |
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.The text was updated successfully, but these errors were encountered: