Commit db86ccb
[SPARK-23433][SPARK-25250][CORE] Later created TaskSet should learn about the finished partitions
## What changes were proposed in this pull request?
This is an optional solution for #22806 .
#21131 firstly implement that a previous successful completed task from zombie TaskSetManager could also succeed the active TaskSetManager, which based on an assumption that an active TaskSetManager always exists for that stage when this happen. But that's not always true as an active TaskSetManager may haven't been created when a previous task succeed, and this is the reason why #22806 hit the issue.
This pr extends #21131 's behavior by adding `stageIdToFinishedPartitions` into TaskSchedulerImpl, which recording the finished partition whenever a task(from zombie or active) succeed. Thus, a later created active TaskSetManager could also learn about the finished partition by looking into `stageIdToFinishedPartitions ` and won't launch any duplicate tasks.
## How was this patch tested?
Add.
Closes #23871 from Ngone51/dev-23433-25250.
Lead-authored-by: wuyi <[email protected]>
Co-authored-by: Ngone51 <[email protected]>
Signed-off-by: Imran Rashid <[email protected]>
(cherry picked from commit e5c6143)
Signed-off-by: Imran Rashid <[email protected]>1 parent 5ec4563 commit db86ccb
3 files changed
Lines changed: 79 additions & 20 deletions
File tree
- core/src
- main/scala/org/apache/spark/scheduler
- test/scala/org/apache/spark/scheduler
Lines changed: 32 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
| |||
236 | 239 | | |
237 | 240 | | |
238 | 241 | | |
239 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
240 | 256 | | |
241 | 257 | | |
242 | 258 | | |
| |||
833 | 849 | | |
834 | 850 | | |
835 | 851 | | |
836 | | - | |
| 852 | + | |
837 | 853 | | |
838 | 854 | | |
839 | 855 | | |
840 | 856 | | |
841 | 857 | | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
842 | 865 | | |
843 | 866 | | |
844 | 867 | | |
845 | 868 | | |
846 | 869 | | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
847 | 875 | | |
848 | | - | |
| 876 | + | |
849 | 877 | | |
850 | 878 | | |
851 | 879 | | |
| |||
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
777 | 777 | | |
778 | 778 | | |
779 | 779 | | |
780 | | - | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
781 | 785 | | |
782 | 786 | | |
783 | 787 | | |
| |||
796 | 800 | | |
797 | 801 | | |
798 | 802 | | |
799 | | - | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
800 | 806 | | |
801 | 807 | | |
802 | 808 | | |
803 | | - | |
| 809 | + | |
804 | 810 | | |
805 | 811 | | |
806 | 812 | | |
807 | 813 | | |
808 | | - | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
809 | 818 | | |
810 | 819 | | |
811 | 820 | | |
| |||
Lines changed: 33 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1102 | 1102 | | |
1103 | 1103 | | |
1104 | 1104 | | |
1105 | | - | |
| 1105 | + | |
1106 | 1106 | | |
1107 | 1107 | | |
1108 | 1108 | | |
| |||
1114 | 1114 | | |
1115 | 1115 | | |
1116 | 1116 | | |
1117 | | - | |
1118 | | - | |
1119 | | - | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
1120 | 1120 | | |
1121 | 1121 | | |
1122 | 1122 | | |
| |||
1133 | 1133 | | |
1134 | 1134 | | |
1135 | 1135 | | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
1136 | 1147 | | |
1137 | | - | |
1138 | | - | |
1139 | | - | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
1140 | 1152 | | |
1141 | 1153 | | |
1142 | 1154 | | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
1143 | 1163 | | |
1144 | 1164 | | |
1145 | 1165 | | |
1146 | 1166 | | |
1147 | 1167 | | |
1148 | 1168 | | |
1149 | 1169 | | |
1150 | | - | |
1151 | | - | |
1152 | | - | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
1153 | 1173 | | |
1154 | 1174 | | |
1155 | 1175 | | |
| 1176 | + | |
1156 | 1177 | | |
1157 | 1178 | | |
1158 | 1179 | | |
1159 | | - | |
| 1180 | + | |
1160 | 1181 | | |
1161 | 1182 | | |
1162 | 1183 | | |
| |||
1204 | 1225 | | |
1205 | 1226 | | |
1206 | 1227 | | |
| 1228 | + | |
1207 | 1229 | | |
1208 | 1230 | | |
1209 | 1231 | | |
| |||
0 commit comments