Commit ddf3ccc
[Fix][Engine] Continue task transition when state entry is missing
When a node is removed during scaling down, the IMap state entries may
be lost. This causes NullPointerException in updateTaskState,
updatePipelineState, and updateJobState, which prevents state
progression and can hang pipeline completion.
Changes:
- PhysicalVertex.updateTaskState: fall back to local cached state when
IMap entry is missing, skip distributed write, continue local transition
- PhysicalVertex.updateStateTimestamps: null-safe guard for timestamps
- SubPlan.updatePipelineState: same null-safe pattern as PhysicalVertex
- SubPlan.updateStateTimestamps: null-safe guard for timestamps
- PhysicalPlan.updateJobState: same null-safe pattern
- PhysicalPlan.getJobStatus/cancelJob: null-safe fallback
- PhysicalPlan.updateStateTimestamps: null-safe guard for timestamps
- Added regression test testUpdateTaskStateWhenStateEntryMissing1 parent 6e94897 commit ddf3ccc
4 files changed
Lines changed: 262 additions & 27 deletions
File tree
- seatunnel-engine/seatunnel-engine-server/src
- main/java/org/apache/seatunnel/engine/server/dag/physical
- test/java/org/apache/seatunnel/engine/server/dag
Lines changed: 49 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
| |||
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
| 136 | + | |
134 | 137 | | |
135 | 138 | | |
136 | 139 | | |
| |||
197 | 200 | | |
198 | 201 | | |
199 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
200 | 207 | | |
201 | 208 | | |
202 | 209 | | |
203 | 210 | | |
204 | 211 | | |
205 | 212 | | |
206 | 213 | | |
207 | | - | |
| 214 | + | |
208 | 215 | | |
209 | 216 | | |
210 | 217 | | |
| |||
249 | 256 | | |
250 | 257 | | |
251 | 258 | | |
252 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
253 | 267 | | |
254 | 268 | | |
255 | 269 | | |
256 | | - | |
257 | | - | |
258 | | - | |
| 270 | + | |
259 | 271 | | |
260 | 272 | | |
261 | 273 | | |
262 | 274 | | |
263 | 275 | | |
264 | 276 | | |
265 | 277 | | |
| 278 | + | |
266 | 279 | | |
267 | 280 | | |
| 281 | + | |
268 | 282 | | |
269 | 283 | | |
270 | 284 | | |
| |||
273 | 287 | | |
274 | 288 | | |
275 | 289 | | |
276 | | - | |
| 290 | + | |
| 291 | + | |
277 | 292 | | |
278 | 293 | | |
279 | | - | |
| 294 | + | |
280 | 295 | | |
281 | 296 | | |
282 | 297 | | |
| |||
293 | 308 | | |
294 | 309 | | |
295 | 310 | | |
| 311 | + | |
296 | 312 | | |
| 313 | + | |
| 314 | + | |
297 | 315 | | |
298 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
299 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
300 | 330 | | |
301 | | - | |
302 | 331 | | |
303 | 332 | | |
304 | 333 | | |
| |||
317 | 346 | | |
318 | 347 | | |
319 | 348 | | |
320 | | - | |
321 | | - | |
322 | | - | |
| 349 | + | |
323 | 350 | | |
324 | 351 | | |
325 | 352 | | |
| |||
334 | 361 | | |
335 | 362 | | |
336 | 363 | | |
337 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
338 | 374 | | |
339 | 375 | | |
340 | 376 | | |
| |||
Lines changed: 29 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
354 | 357 | | |
| 358 | + | |
| 359 | + | |
355 | 360 | | |
356 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
357 | 364 | | |
358 | | - | |
359 | | - | |
360 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
361 | 376 | | |
362 | 377 | | |
363 | 378 | | |
| |||
380 | 395 | | |
381 | 396 | | |
382 | 397 | | |
| 398 | + | |
383 | 399 | | |
384 | 400 | | |
385 | 401 | | |
386 | | - | |
387 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
388 | 408 | | |
| 409 | + | |
389 | 410 | | |
390 | 411 | | |
391 | 412 | | |
| |||
470 | 491 | | |
471 | 492 | | |
472 | 493 | | |
473 | | - | |
| 494 | + | |
474 | 495 | | |
475 | 496 | | |
476 | | - | |
| 497 | + | |
477 | 498 | | |
478 | 499 | | |
479 | 500 | | |
| |||
Lines changed: 27 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
348 | 351 | | |
| 352 | + | |
| 353 | + | |
349 | 354 | | |
350 | | - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
351 | 358 | | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
352 | 369 | | |
353 | | - | |
354 | 370 | | |
355 | 371 | | |
356 | 372 | | |
| |||
376 | 392 | | |
377 | 393 | | |
378 | 394 | | |
| 395 | + | |
379 | 396 | | |
380 | 397 | | |
381 | 398 | | |
382 | | - | |
383 | | - | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
384 | 404 | | |
| 405 | + | |
385 | 406 | | |
386 | 407 | | |
387 | 408 | | |
| |||
440 | 461 | | |
441 | 462 | | |
442 | 463 | | |
443 | | - | |
| 464 | + | |
444 | 465 | | |
445 | 466 | | |
446 | | - | |
| 467 | + | |
447 | 468 | | |
448 | 469 | | |
449 | 470 | | |
| |||
0 commit comments