Commit 8fe3014
Fix: backfill historical gaps in SERVER_CHANGE_LOG during migrate (#27703)
processNativeMigrations used sameOrHigherMajorMinor to gate unexecuted
migrations by the current max's major.minor. That gate silently drops any
version recorded on disk but missing from the ledger whose major.minor is
lower than the current max — for example a historical gap at 1.5.15 when
the dump was last migrated through 1.9.x, or a backported 1.11.11 landing
after 1.12.1 was already cut.
The containment check against SERVER_CHANGE_LOG is sufficient on its own:
any version already executed is skipped, any version not executed is
planned. Maintaining the reprocessing-on-maxVer path preserves the
continuous-release behavior introduced in #26571 (new SQL appended to the
current version's schemaChanges.sql is picked up via checksum filter in
SERVER_MIGRATION_SQL_LOGS).
This also brings processNativeMigrations in line with
processExtensionMigrations, which already uses the same containment-only
filter. See also #26592 which applied the equivalent simplification on
the 1.12.x release line.
Tests:
- Updated three tests that encoded the old exclusion behavior to assert
backports and historical gaps now get planned.
- Added a historical-gap scenario (1.5.15 below executed max 1.10.5).
- Removed sameOrHigherMajorMinorComparisons (method is gone).
Co-authored-by: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com>1 parent 3d88c99 commit 8fe3014
2 files changed
Lines changed: 73 additions & 30 deletions
File tree
- openmetadata-service/src
- main/java/org/openmetadata/service/migration/api
- test/java/org/openmetadata/service/migration/api
Lines changed: 1 addition & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | 266 | | |
274 | 267 | | |
275 | 268 | | |
| |||
321 | 314 | | |
322 | 315 | | |
323 | 316 | | |
324 | | - | |
325 | | - | |
| 317 | + | |
326 | 318 | | |
327 | 319 | | |
328 | 320 | | |
| |||
Lines changed: 72 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
413 | | - | |
| 413 | + | |
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
432 | | - | |
433 | | - | |
434 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
435 | 457 | | |
436 | 458 | | |
437 | 459 | | |
| |||
458 | 480 | | |
459 | 481 | | |
460 | 482 | | |
461 | | - | |
| 483 | + | |
462 | 484 | | |
463 | 485 | | |
464 | 486 | | |
| |||
606 | 628 | | |
607 | 629 | | |
608 | 630 | | |
609 | | - | |
| 631 | + | |
610 | 632 | | |
611 | 633 | | |
612 | 634 | | |
| |||
627 | 649 | | |
628 | 650 | | |
629 | 651 | | |
630 | | - | |
631 | | - | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
632 | 696 | | |
633 | 697 | | |
634 | 698 | | |
| |||
696 | 760 | | |
697 | 761 | | |
698 | 762 | | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | 763 | | |
713 | 764 | | |
714 | 765 | | |
| |||
0 commit comments