Retry BBMs affected by single-record bug
Ref: #590848
What does this MR do and why?
This MR adds a post-deploy migration to automatically retry batched background migrations that were silently skipped due to the single-record bug fixed in !224446 (merged).
When upgrading to %18.8, BBMs targeting tables with a single record were incorrectly marked as finished without ever executing. This left data unbackfilled, causing upgrade failures on self-managed instances.
The migration resets affected BBMs from finished/finalized back to paused so the scheduler re-executes them. It scopes to BBMs with queued_migration_version between %18.5 and %18.8 where min_value = max_value or min_cursor = max_cursor.
Backport strategy
Once merged and deployed, we will backport to:
-
18.9: Cherry-pick with an earlier timestamp (
20260209000000) so it runs before the NOT NULL constraint migration (20260209093954) from !222741 (merged). This ensures affected BBMs are reset before the constraint is validated. Similar approach to !177541 (merged). - 18.8: Cherry-pick onto the existing backport branch (which already contains the BBM fix from !224446 (merged)). Since 18.8 has no constraint migration, the scheduler will complete the BBMs before the customer upgrades to 18.9.
Edited by Max Orefice