Commit 9d9186e
committed
fix(storage): settle copilot accounting before deleting the blob
Address Cursor review: the blob was removed before releaseDeletedFileStorage, so
a release failure left the counter inflated and the metadata active with the blob
gone. Now the atomic soft-delete + decrement runs first and the blob is deleted
only if it succeeds, so a failure leaves the file fully intact and retryable.1 parent b9ac77e commit 9d9186e
1 file changed
Lines changed: 13 additions & 8 deletions
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | | - | |
254 | 252 | | |
255 | 253 | | |
256 | 254 | | |
257 | 255 | | |
258 | 256 | | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
264 | 262 | | |
265 | 263 | | |
266 | 264 | | |
| |||
270 | 268 | | |
271 | 269 | | |
272 | 270 | | |
| 271 | + | |
273 | 272 | | |
274 | 273 | | |
275 | 274 | | |
276 | 275 | | |
277 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
278 | 283 | | |
0 commit comments