Repository navigation
Commit 1c9ba1f
committed
fix: reset drainScheduled if OpExecutor.drain exits abruptly
handler.uncaught is the last-resort recovery for a task throw; it cancels
the chain, which drives Done.onStart, which calls listener.onClose. If
the user's terminal listener also throws, the throw escapes the handler
and exits drain() before reaching the `r == null` branch that clears
drainScheduled. The flag stays set and every subsequent execute() queues
without rescheduling — the OpExecutor is wedged.
Per-op lifecycle today has no work after terminal close, so the wedge
leaks nothing observable. Fixing it for symmetry with scheduleDrainLocked
(which already resets drainScheduled on a backing.execute throw) and to
keep the contract robust if a future handler can throw on a non-terminal
op.
Caught by gemini-code-assist on PR googleapis#13604.1 parent 1251fe7 commit 1c9ba1f
1 file changed
Lines changed: 28 additions & 17 deletions
File tree
- java-bigtable/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/middleware
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
130 | 137 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | 138 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
142 | 148 | | |
143 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
144 | 155 | | |
145 | 156 | | |
146 | 157 | | |
| |||
0 commit comments