Commit 98c4fc3
committed
fix(pipeline): harden ADR preservation and add regression test (#516)
Addresses review on #539.
- Free p->saved_adr in cbm_pipeline_free so it is not leaked on error
paths that exit before the restore in dump_and_persist_hashes (e.g. a
cbm_gbuf_dump_to_sqlite failure).
- Check cbm_store_adr_store's return value on restore and log an error
instead of silently dropping the ADR (the original #516 symptom).
- Add reproduce-first test pipeline_adr_survives_full_reindex: index,
store an ADR, force a full re-index by adding files, assert the ADR
survives unchanged. Passes against the fix.
Signed-off-by: RithvikReddy0-0 <rithvikreddymukkara@gmail.com>1 parent 7f622b1 commit 98c4fc3
2 files changed
Lines changed: 78 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
189 | 192 | | |
190 | 193 | | |
191 | 194 | | |
| |||
890 | 893 | | |
891 | 894 | | |
892 | 895 | | |
893 | | - | |
| 896 | + | |
| 897 | + | |
894 | 898 | | |
895 | | - | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
896 | 902 | | |
897 | 903 | | |
898 | 904 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
276 | 345 | | |
277 | 346 | | |
278 | 347 | | |
| |||
6092 | 6161 | | |
6093 | 6162 | | |
6094 | 6163 | | |
| 6164 | + | |
6095 | 6165 | | |
6096 | 6166 | | |
6097 | 6167 | | |
| |||
0 commit comments