Repository navigation
Commit 0a84677
fix: stop a clean close from disabling the retirement compensation wait
Retirement compensation decides whether to wait for the restored managed route
by asking whether anything went wrong, and it asked with len(restoreErrors)==0.
Appending still grows a slice when the value is nil, and two of the appends
were unconditional: deletionLock.Close() and errors.Join of an open error with
a resolver close. Closing cleanly therefore made the check false every time, so
waitForMountAcknowledgement and the route verification behind it never ran —
rollback returned the moment it had rewritten the state, before the route it
had just restored was readable again.
errors.Is on the returned error could not see this: the rejection is joined
with the restore errors, and it matches on the rejection alone. The only test
that observed it read a channel the restoring goroutine had not necessarily
reached yet, so the failure was a platform-dependent coin flip rather than the
certainty it actually was.
Record only real failures. A unit test pins the accounting, since that is the
part that silently decided the behaviour.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent d8988a7 commit 0a84677
2 files changed
Lines changed: 41 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2044 | 2044 | | |
2045 | 2045 | | |
2046 | 2046 | | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
2047 | 2057 | | |
2048 | 2058 | | |
2049 | 2059 | | |
2050 | 2060 | | |
2051 | 2061 | | |
2052 | 2062 | | |
2053 | 2063 | | |
2054 | | - | |
| 2064 | + | |
2055 | 2065 | | |
2056 | 2066 | | |
2057 | 2067 | | |
| |||
2105 | 2115 | | |
2106 | 2116 | | |
2107 | 2117 | | |
2108 | | - | |
| 2118 | + | |
2109 | 2119 | | |
2110 | 2120 | | |
2111 | 2121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5241 | 5241 | | |
5242 | 5242 | | |
5243 | 5243 | | |
| 5244 | + | |
| 5245 | + | |
| 5246 | + | |
| 5247 | + | |
| 5248 | + | |
| 5249 | + | |
| 5250 | + | |
| 5251 | + | |
| 5252 | + | |
| 5253 | + | |
| 5254 | + | |
| 5255 | + | |
| 5256 | + | |
| 5257 | + | |
| 5258 | + | |
| 5259 | + | |
| 5260 | + | |
| 5261 | + | |
| 5262 | + | |
| 5263 | + | |
| 5264 | + | |
| 5265 | + | |
| 5266 | + | |
| 5267 | + | |
| 5268 | + | |
| 5269 | + | |
| 5270 | + | |
| 5271 | + | |
| 5272 | + | |
0 commit comments