Commit dd42609
fix(backup): retry fs.rm on EBUSY to prevent tar retry-loop collapse on Windows
On Windows, fs.rm can throw EBUSY when the runTar process still holds a
file descriptor. The old code caught and logged the error but left the
locked file behind, causing the next runTar attempt to fail immediately
and defeating the BACKUP_TAR_BACKOFF_MS retry mechanism.
Fix: wrap fs.rm in a removeTempArchive helper that retries up to 3 times
with a 100ms sleep on EBUSY, giving the OS time to release the handle.
Fixes #101382.
Co-Authored-By: Claude <[email protected]>1 parent 36a91ac commit dd42609
1 file changed
Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
173 | 197 | | |
174 | 198 | | |
175 | 199 | | |
| |||
188 | 212 | | |
189 | 213 | | |
190 | 214 | | |
191 | | - | |
| 215 | + | |
192 | 216 | | |
193 | 217 | | |
194 | 218 | | |
| |||
0 commit comments