sql: tables with abandoned schema change mutations with failed jobs cannot be dropped #57597
Labels
A-schema-changes
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
When a schema change job undergoes a failure while reverting, the corresponding mutation, if there is one, gets stuck on the table descriptor forever, and the job will end up as
failed
. In this state, it becomes impossible to drop the table or its parent database, because we'll attempt to mark the job assucceeded
(under the assumption that it's an ongoing schema change), but this isn't possible with a failed job:cockroach/pkg/sql/drop_table.go
Lines 442 to 460 in 510d541
The error that gets returned is incomprehensible:
The text was updated successfully, but these errors were encountered: