Commit 0da667d
[SPARK-28917][CORE] Synchronize access to RDD mutable state
RDD dependencies and partitions can be simultaneously
accessed and mutated by user threads and spark's scheduler threads, so
access must be thread-safe. In particular, as partitions and
dependencies are lazily-initialized, before this change they could get
initialized multiple times, which would lead to the scheduler having an
inconsistent view of the pendings stages and get stuck.
Tested with existing unit tests.
Closes apache#25951 from squito/SPARK-28917.
Authored-by: Imran Rashid <[email protected]>
Signed-off-by: Marcelo Vanzin <[email protected]>1 parent de360e9 commit 0da667d
File tree
3 files changed
+51
-11
lines changed- core/src
- main/scala/org/apache/spark
- rdd
- scheduler
- test/scala/org/apache/spark
3 files changed
+51
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
228 | 242 | | |
229 | 243 | | |
230 | | - | |
231 | | - | |
| 244 | + | |
| 245 | + | |
232 | 246 | | |
233 | 247 | | |
234 | 248 | | |
| |||
240 | 254 | | |
241 | 255 | | |
242 | 256 | | |
243 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
244 | 262 | | |
245 | 263 | | |
246 | 264 | | |
| |||
253 | 271 | | |
254 | 272 | | |
255 | 273 | | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
260 | 282 | | |
261 | 283 | | |
262 | 284 | | |
| |||
1788 | 1810 | | |
1789 | 1811 | | |
1790 | 1812 | | |
1791 | | - | |
| 1813 | + | |
1792 | 1814 | | |
1793 | 1815 | | |
1794 | 1816 | | |
| |||
1800 | 1822 | | |
1801 | 1823 | | |
1802 | 1824 | | |
1803 | | - | |
| 1825 | + | |
1804 | 1826 | | |
1805 | 1827 | | |
1806 | 1828 | | |
| |||
1959 | 1981 | | |
1960 | 1982 | | |
1961 | 1983 | | |
| 1984 | + | |
1962 | 1985 | | |
1963 | 1986 | | |
1964 | 1987 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
403 | | - | |
| 403 | + | |
| 404 | + | |
404 | 405 | | |
405 | 406 | | |
406 | 407 | | |
| |||
1080 | 1081 | | |
1081 | 1082 | | |
1082 | 1083 | | |
1083 | | - | |
| 1084 | + | |
| 1085 | + | |
1084 | 1086 | | |
1085 | 1087 | | |
1086 | 1088 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
342 | 357 | | |
343 | 358 | | |
344 | 359 | | |
| |||
0 commit comments