Commit 195a363
Retry each metadata failure exactly once per gateway flip
The gateway-flip retry effect had two churn paths (Bugbot, PR Chia-Network#3029):
retrying an errored entry re-inserts its key with a fresh in-flight
promise synchronously, and Map.forEach revisits keys re-added during
the pass - so the effect attached a rejection retry to the very fetch
it had just started, double-fetching a failure. And rapid toggles could
stack rejection handlers on one promise; when it rejected, each handler
invalidated in turn, the later ones discarding the refetch the first
had started - even a successful one.
The effect now iterates a snapshot of the map, and a rejection handler
retries only the failure it saw: the fetch's own catch stores its
rejection as the entry's error, so an entry that has moved on - already
retried by a stacked handler, or settled successfully - is left alone.
Each failure is retried exactly once per flip and successful results
are never dropped.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017NXWAjaHb9SFafLeguTHd81 parent e715a4d commit 195a363
1 file changed
Lines changed: 16 additions & 2 deletions
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
182 | 187 | | |
183 | 188 | | |
184 | 189 | | |
| |||
187 | 192 | | |
188 | 193 | | |
189 | 194 | | |
190 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
191 | 205 | | |
192 | 206 | | |
193 | 207 | | |
| |||
0 commit comments