OnlineDDL: an --in-order-completion
migration should fail if prior migrations have failed (limit to same context)
#16070
Labels
The DDL startegy flag
--in-order-completion
is designed to make migrations compelte in the same order they were submitted. Per the docsThe point of in-order is to be able to handle dependencies. As the simplest example, you cannot create a view
v
that reads from tablet
before you've created tablet
. It should therefore stand that if creation oft
failed, it's pointless to attempt to createv
.In the current
vitess
behavior, a migration waits for chronologically prior migrations before running or completing, but it only considers pending migrations, ie those which are inqueued
,ready
, orrunning
state. We should now also consider that if any prior migration isfailed
orcancelled
, then there's no point in running our next migration.Of course, there could be dozens of
failed
migrations in months of history. We therefore should limit the search to migrations in the same migration context.This logic should apply in two scenarios:
in-order
migration where a previous migration has failed (or was cancelled)The text was updated successfully, but these errors were encountered: