Commit f06c01d
committed
bboltcachestorage: delete links outside of cursor
The `emptyBranchWithParents` method could accidentally leave link
entries that shouldn't exist. When finding these links, deleting during
the iteration can sometimes cause the cursor to jump entries that should
be deleted.
This changes the code path to delete the links outside of the iteration
to avoid this.
This is caused by a long-standing bug in bolt that can't be fixed
easily. See etcd-io/bbolt#611 for details.
Signed-off-by: Jonathan A. Sternberg <[email protected]>1 parent 449856f commit f06c01d
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
270 | 273 | | |
271 | 274 | | |
272 | 275 | | |
273 | 276 | | |
274 | 277 | | |
275 | 278 | | |
276 | | - | |
| 279 | + | |
277 | 280 | | |
278 | 281 | | |
279 | 282 | | |
280 | 283 | | |
281 | 284 | | |
282 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
283 | 292 | | |
284 | 293 | | |
285 | 294 | | |
| |||
0 commit comments