Add cursor batch as default BBM
What does this MR do and why?
Add cursor batch as default BBM
🔄 Automatic Cursor Detection
- The BBM helper now automatically detects cursor-based jobs and uses
min_cursor/max_cursorinstead ofmin_value/max_value - The
.cursor?method now returnstruewhenever cursor columns are present (not just for composite cursors)
🛠️ Generator & Template Updates
- Migration generator templates now include comments indicating cursor strategy is the default
- Added guidance on how to define the
cursormethod for custom cursor columns
🧪 Implementation Details
-
queue_batched_background_migrationnow callscalculate_max_cursor_valuesto compute max cursor values viaORDER BYon cursor columns - Updated job status logic: sets status to
activewhen data exists,finishedwhen table is empty
References
Closes #524103
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.