Commit 7c65e19
[forwarder] Fix error on removal of transactions (#3287)
Fixes `ValueError: list.remove(x): x not in list` error
Fix in 2 parts:
1. Recompute next flush of transactions on flush timeout.
This is needed so that when a flush timeout occurs, the transactions
of that flush do not stay at the head of the queue (if they do stay
at the head of the queue then, when the max queue size is hit, newer
transactions are deleted first, which is not desirable).
Recomputing the next flush time might delay these transactions
slightly (up to MAX_WAIT_FOR_REPLAY seconds, i.e. 90 seconds), but it's
ok here since at this point these transactions have probably been
waiting for some time already.
2. Safely remove transactions from list
So that the forwarder doesn't crash when a removal attempt is made on
a transaction that was already removed.1 parent e995bb9 commit 7c65e19
1 file changed
+18
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | | - | |
139 | | - | |
| 137 | + | |
140 | 138 | | |
141 | 139 | | |
142 | 140 | | |
| |||
148 | 146 | | |
149 | 147 | | |
150 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
151 | 160 | | |
152 | 161 | | |
153 | 162 | | |
| |||
201 | 210 | | |
202 | 211 | | |
203 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
204 | 217 | | |
205 | 218 | | |
206 | 219 | | |
| |||
277 | 290 | | |
278 | 291 | | |
279 | 292 | | |
280 | | - | |
281 | | - | |
282 | | - | |
| 293 | + | |
283 | 294 | | |
284 | 295 | | |
285 | 296 | | |
| |||
295 | 306 | | |
296 | 307 | | |
297 | 308 | | |
298 | | - | |
299 | | - | |
300 | | - | |
| 309 | + | |
301 | 310 | | |
302 | 311 | | |
0 commit comments