Commit e8c06af
[SPARK-32003][CORE] When external shuffle service is used, unregister outputs for executor on fetch failure after executor is lost
### What changes were proposed in this pull request?
If an executor is lost, the `DAGScheduler` handles the executor loss by removing the executor but does not unregister its outputs if the external shuffle service is used. However, if the node on which the executor runs is lost, the shuffle service may not be able to serve the shuffle files.
In such a case, when fetches from the executor's outputs fail in the same stage, the `DAGScheduler` again removes the executor and by right, should unregister its outputs. It doesn't because the epoch used to track the executor failure has not increased.
We track the epoch for failed executors that result in lost file output separately, so we can unregister the outputs in this scenario. The idea to track a second epoch is due to Attila Zsolt Piros.
### Why are the changes needed?
Without the changes, the loss of a node could require two stage attempts to recover instead of one.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
New unit test. This test fails without the change and passes with it.
Closes #28848 from wypoon/SPARK-32003.
Authored-by: Wing Yew Poon <wypoon@cloudera.com>
Signed-off-by: Imran Rashid <irashid@cloudera.com>1 parent 04bf351 commit e8c06af
File tree
2 files changed
+148
-50
lines changed- core/src
- main/scala/org/apache/spark/scheduler
- test/scala/org/apache/spark/scheduler
2 files changed
+148
-50
lines changedLines changed: 67 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
180 | 201 | | |
181 | 202 | | |
182 | 203 | | |
| |||
1566 | 1587 | | |
1567 | 1588 | | |
1568 | 1589 | | |
1569 | | - | |
| 1590 | + | |
| 1591 | + | |
1570 | 1592 | | |
1571 | 1593 | | |
1572 | 1594 | | |
| |||
1912 | 1934 | | |
1913 | 1935 | | |
1914 | 1936 | | |
1915 | | - | |
1916 | | - | |
1917 | | - | |
1918 | | - | |
1919 | | - | |
1920 | | - | |
| 1937 | + | |
| 1938 | + | |
1921 | 1939 | | |
1922 | 1940 | | |
1923 | 1941 | | |
| |||
1933 | 1951 | | |
1934 | 1952 | | |
1935 | 1953 | | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
1936 | 1968 | | |
1937 | 1969 | | |
1938 | 1970 | | |
1939 | 1971 | | |
1940 | 1972 | | |
1941 | 1973 | | |
1942 | | - | |
1943 | | - | |
1944 | | - | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
1945 | 1979 | | |
1946 | | - | |
1947 | | - | |
1948 | | - | |
1949 | | - | |
1950 | | - | |
1951 | | - | |
1952 | | - | |
1953 | | - | |
1954 | | - | |
1955 | | - | |
1956 | | - | |
1957 | | - | |
1958 | | - | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
1959 | 1992 | | |
1960 | 1993 | | |
1961 | 1994 | | |
| |||
1981 | 2014 | | |
1982 | 2015 | | |
1983 | 2016 | | |
1984 | | - | |
1985 | | - | |
| 2017 | + | |
| 2018 | + | |
1986 | 2019 | | |
1987 | | - | |
| 2020 | + | |
1988 | 2021 | | |
| 2022 | + | |
1989 | 2023 | | |
1990 | 2024 | | |
1991 | 2025 | | |
| |||
Lines changed: 81 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
235 | 238 | | |
236 | 239 | | |
237 | 240 | | |
| 241 | + | |
238 | 242 | | |
239 | 243 | | |
240 | 244 | | |
| |||
248 | 252 | | |
249 | 253 | | |
250 | 254 | | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
261 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
262 | 267 | | |
263 | 268 | | |
264 | 269 | | |
| |||
276 | 281 | | |
277 | 282 | | |
278 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
279 | 294 | | |
280 | 295 | | |
281 | 296 | | |
| |||
293 | 308 | | |
294 | 309 | | |
295 | 310 | | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
| 311 | + | |
| 312 | + | |
301 | 313 | | |
302 | 314 | | |
303 | 315 | | |
| |||
548 | 560 | | |
549 | 561 | | |
550 | 562 | | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
551 | 613 | | |
552 | 614 | | |
553 | 615 | | |
| |||
765 | 827 | | |
766 | 828 | | |
767 | 829 | | |
768 | | - | |
769 | | - | |
| 830 | + | |
770 | 831 | | |
771 | 832 | | |
772 | 833 | | |
| |||
806 | 867 | | |
807 | 868 | | |
808 | 869 | | |
| 870 | + | |
809 | 871 | | |
| 872 | + | |
810 | 873 | | |
811 | 874 | | |
812 | 875 | | |
813 | 876 | | |
| 877 | + | |
814 | 878 | | |
815 | 879 | | |
816 | 880 | | |
| |||
0 commit comments