Commit 93233a9
authored
[Disco] Treat hangup of disco worker process as kShutdown (#16989)
Prior to this commit, each disco worker needed to receive
`DiscoAction::kShutdown` in order to close cleanly. While this is
sent from the destructor of `ProcessSessionObj`, which owns the worker
processes, this does not guarantee that the disco workers will receive
the shutdown command. For example, the controller process holding the
`ProcessSessionObj` may reach a timeout and be terminated, preventing
it from sending the `DiscoAction::kShutdown` command.
This commit updates the disco worker to check for a closed pipe that
occurs between two packets, and to treat this as if the
`DiscoAction::kShutdown` command were received. A closed pipe that
occurs at any other location is still treated as an error and
reported.1 parent c6a8a80 commit 93233a9
1 file changed
+34
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
56 | 66 | | |
57 | 67 | | |
58 | 68 | | |
| |||
62 | 72 | | |
63 | 73 | | |
64 | 74 | | |
65 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
66 | 86 | | |
67 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
68 | 94 | | |
69 | 95 | | |
70 | 96 | | |
71 | 97 | | |
72 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
73 | 102 | | |
74 | 103 | | |
75 | 104 | | |
76 | 105 | | |
| 106 | + | |
77 | 107 | | |
78 | 108 | | |
79 | 109 | | |
| |||
0 commit comments