Repository navigation
Commit 665f86b
committed
[fix](ivm) Judge the streams of a pending baseline rebuild before it runs
The pre-step that rebuilds the partitions an IVM baseline barrier names runs before the attempt list
does, and it runs the partition refresh directly. PARTITIONS FALLBACK builds [PARTITIONS, COMPLETE],
which holds no IVM attempt, so the preflight in buildAttempts never judges its streams: with a partial
barrier pending and a stream missing for the partitions it rebuilds, the pre-step started that rebuild,
IvmFullRefreshMTMV threw STREAM_UNSUPPORTED out of it, and the task failed without reaching the COMPLETE
attempt that reconciles the stream.
Key changes:
- Judge the streams of the partitions the pre-step rebuilds, with the predicate the partition attempt already uses, before it writes its barrier and before it commits to the rebuild
- Route a fallback-authorized request to the COMPLETE attempt, which reconciles the stream and clears the barrier that stays pending; a request that may not fall back fails instead of starting a rebuild that cannot read its streams
Unit Test:
- MTMVTaskTest.testPendingBaselineRebuildChecksTheStreamsItsPartitionsRead: a non-empty partial barrier plus a stream missing for a table the rebuild reads goes to COMPLETE without writing a barrier, and the same request without fallback fails. Without the change the attempt list stays [PARTITIONS, COMPLETE] and the pre-step runs the rebuild inline.
- Regression: mtmv_p0/ivm/test_ivm_partitions_fallback_stream_unusable and test_ivm_chained_stream_scope pass unchanged. Neither covers this path: reaching it needs a partial refresh to fail after its barrier is written, which no debug point injects, so this shape stays unit-covered.1 parent 0148150 commit 665f86b
2 files changed
Lines changed: 85 additions & 4 deletions
File tree
- fe/fe-core/src
- main/java/org/apache/doris/job/extensions/mtmv
- test/java/org/apache/doris/mtmv
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
647 | 667 | | |
648 | 668 | | |
649 | 669 | | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
654 | 673 | | |
655 | 674 | | |
656 | 675 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
913 | 913 | | |
914 | 914 | | |
915 | 915 | | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
916 | 937 | | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
917 | 977 | | |
| 978 | + | |
| 979 | + | |
918 | 980 | | |
919 | 981 | | |
920 | 982 | | |
| |||
0 commit comments