Commit cfd87ec
authored
Avoid leaking sitrep rows during deletion (#10143)
Fixes #10131
In an attempt to avoid using transactions during the INSERT pathway
(see: #10133)
this PR instead tries to alter how DELETE works for sitreps.
Rather than using a two-step GC process (listing orphaned sitreps and
deleting
them - even while concurrent INSERT operations could be underway) this
PR
also enables the deletion of "rows within a sitrep, for which the sitrep
metadata
record no longer exists".
This allows us to delete rows that were previously leaked, and is also
now the
primary mechanism by which rows are removed: we delete the high-level
sitrep first, then remove all these newly-orphaned rows. This is still
performed
within a transaction on the DELETE pathway to avoid reading torn sitreps
during the loading phase (as originally appeared in
#9594).1 parent a32ad4b commit cfd87ec
9 files changed
Lines changed: 1153 additions & 442 deletions
File tree
- dev-tools/omdb
- src/bin/omdb
- tests
- nexus
- db-queries
- src/db/datastore
- tests/output
- src/app/background/tasks
- types/src/internal_api
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3459 | 3459 | | |
3460 | 3460 | | |
3461 | 3461 | | |
3462 | | - | |
3463 | 3462 | | |
| 3463 | + | |
| 3464 | + | |
| 3465 | + | |
3464 | 3466 | | |
3465 | 3467 | | |
3466 | 3468 | | |
| |||
3473 | 3475 | | |
3474 | 3476 | | |
3475 | 3477 | | |
3476 | | - | |
3477 | | - | |
3478 | | - | |
3479 | | - | |
3480 | | - | |
3481 | | - | |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
| 3481 | + | |
| 3482 | + | |
| 3483 | + | |
| 3484 | + | |
| 3485 | + | |
| 3486 | + | |
| 3487 | + | |
| 3488 | + | |
| 3489 | + | |
3482 | 3490 | | |
3483 | | - | |
| 3491 | + | |
| 3492 | + | |
| 3493 | + | |
| 3494 | + | |
| 3495 | + | |
3484 | 3496 | | |
3485 | 3497 | | |
3486 | 3498 | | |
3487 | 3499 | | |
3488 | 3500 | | |
3489 | | - | |
| 3501 | + | |
| 3502 | + | |
| 3503 | + | |
| 3504 | + | |
| 3505 | + | |
3490 | 3506 | | |
3491 | | - | |
| 3507 | + | |
| 3508 | + | |
3492 | 3509 | | |
| 3510 | + | |
| 3511 | + | |
| 3512 | + | |
| 3513 | + | |
| 3514 | + | |
| 3515 | + | |
| 3516 | + | |
| 3517 | + | |
| 3518 | + | |
| 3519 | + | |
| 3520 | + | |
| 3521 | + | |
| 3522 | + | |
3493 | 3523 | | |
3494 | 3524 | | |
3495 | 3525 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
713 | 713 | | |
714 | 714 | | |
715 | 715 | | |
716 | | - | |
717 | | - | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
718 | 725 | | |
719 | 726 | | |
720 | 727 | | |
| |||
1346 | 1353 | | |
1347 | 1354 | | |
1348 | 1355 | | |
1349 | | - | |
1350 | | - | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
1351 | 1365 | | |
1352 | 1366 | | |
1353 | 1367 | | |
| |||
0 commit comments