Commit 2b396b9
committed
Fix AB-BA deadlock between SpillableHostStore and SpillableHandle
This fixes a potential deadlock during shutdown where:
- Thread 1 (HandleStore.close): Store lock -> Handle lock
- Thread 2 (handle.spill): Handle lock -> Store lock
The fix ensures consistent lock ordering (Handle lock -> Store lock)
by copying handles list under store lock, then processing outside.
Affected methods:
- HandleStore.close(): Now closes handles outside store lock
- SpillableStore.spillableSummary(): Now checks spillable outside store lock
Fixes #14201
Signed-off-by: Hongbin Ma (Mahone) <mahongbin@apache.org>1 parent 2acd1ec commit 2b396b9
1 file changed
Lines changed: 36 additions & 14 deletions
Lines changed: 36 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1337 | 1337 | | |
1338 | 1338 | | |
1339 | 1339 | | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
1344 | | - | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
1345 | 1357 | | |
1346 | 1358 | | |
1347 | 1359 | | |
| |||
1436 | 1448 | | |
1437 | 1449 | | |
1438 | 1450 | | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
1439 | 1459 | | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
1440 | 1463 | | |
1441 | 1464 | | |
1442 | 1465 | | |
1443 | | - | |
1444 | | - | |
1445 | | - | |
1446 | | - | |
1447 | | - | |
1448 | | - | |
1449 | | - | |
1450 | | - | |
1451 | | - | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
1452 | 1474 | | |
1453 | 1475 | | |
1454 | 1476 | | |
| |||
0 commit comments