Commit 0f9bd91
committed
KAFKA-19994: TaskManager may not close all tasks on task timeouts (#21155)
When a TimeoutException occurs while trying to put multiple active tasks
back into running, we will add the timed out task back to the state
updater, so that we retry it.
However, if we run into a Task timeout (failing to make progress for a
long time), we will rethrow a StreamsException wrapping the
TimeoutException we have drained multiple tasks from the state
updater, they will be lost, and not added back to the state updater,
and therefore not be closed correctly. The task directories remain
locked, causing issues trying to replace the stream thread.
Reviewers: Matthias J. Sax <[email protected]>1 parent cb86075 commit 0f9bd91
File tree
2 files changed
+67
-3
lines changed- streams/src
- main/java/org/apache/kafka/streams/processor/internals
- test/java/org/apache/kafka/streams/processor/internals
2 files changed
+67
-3
lines changedLines changed: 21 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
978 | 979 | | |
979 | 980 | | |
980 | 981 | | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
981 | 985 | | |
982 | 986 | | |
983 | | - | |
| 987 | + | |
984 | 988 | | |
985 | 989 | | |
986 | 990 | | |
| |||
1057 | 1061 | | |
1058 | 1062 | | |
1059 | 1063 | | |
1060 | | - | |
1061 | | - | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
1062 | 1080 | | |
1063 | 1081 | | |
1064 | 1082 | | |
| |||
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1643 | 1643 | | |
1644 | 1644 | | |
1645 | 1645 | | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
1646 | 1692 | | |
1647 | 1693 | | |
1648 | 1694 | | |
| |||
0 commit comments