Commit 15fa186
committed
fix(graph-maintenance): restore the review fixes without the birth-time enqueue
Drops the "queue every entity at creation" change and keeps the rest of the
review round (dataclass pass results, the Oracle IN-list chunking on the by-unit
enqueue, the per-site enqueue tests, the migration-seed test, the budget's
follow-up-chain test, the stale-comment sweep).
The birth-time enqueue existed to reclaim an entity created in retain's Phase 1
whose Phase-2 link never landed. It is not worth what it costs: such a row is a
single entry in the registry with no postings and no cooccurrences, and #2662
exists because the retry is *supposed* to adopt it — Phase 2 reasserts resolved
parents under FOR KEY SHARE precisely so a pruner cannot delete one out from
under it. Pointing the pruner at every freshly created entity leans on that race
for a leak that is one row wide. #3408 landing the set-based predicate is what
made the trade obviously bad: the expensive half of this job was never those
rows.
Entities created but never linked are therefore no longer proactively reclaimed.
The migration's one-time seed still clears the population a bank has already
accumulated.1 parent 7915b91 commit 15fa186
10 files changed
Lines changed: 281 additions & 59 deletions
File tree
- hindsight-api-slim
- hindsight_api/engine
- db
- memories
- pg
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
233 | | - | |
| 232 | + | |
| 233 | + | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
362 | 392 | | |
363 | 393 | | |
364 | 394 | | |
| |||
1157 | 1187 | | |
1158 | 1188 | | |
1159 | 1189 | | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
1163 | 1195 | | |
1164 | 1196 | | |
1165 | 1197 | | |
| |||
1169 | 1201 | | |
1170 | 1202 | | |
1171 | 1203 | | |
1172 | | - | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
1173 | 1207 | | |
1174 | 1208 | | |
1175 | | - | |
| 1209 | + | |
1176 | 1210 | | |
1177 | | - | |
| 1211 | + | |
1178 | 1212 | | |
1179 | 1213 | | |
1180 | 1214 | | |
| |||
1194 | 1228 | | |
1195 | 1229 | | |
1196 | 1230 | | |
| 1231 | + | |
1197 | 1232 | | |
1198 | 1233 | | |
1199 | 1234 | | |
1200 | 1235 | | |
| 1236 | + | |
1201 | 1237 | | |
1202 | 1238 | | |
1203 | 1239 | | |
| |||
Lines changed: 40 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
90 | 96 | | |
91 | 97 | | |
92 | 98 | | |
| |||
557 | 563 | | |
558 | 564 | | |
559 | 565 | | |
560 | | - | |
| 566 | + | |
561 | 567 | | |
562 | 568 | | |
563 | 569 | | |
| |||
583 | 589 | | |
584 | 590 | | |
585 | 591 | | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
| 592 | + | |
| 593 | + | |
590 | 594 | | |
591 | 595 | | |
592 | 596 | | |
| |||
628 | 632 | | |
629 | 633 | | |
630 | 634 | | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
636 | 640 | | |
637 | 641 | | |
638 | 642 | | |
| |||
786 | 790 | | |
787 | 791 | | |
788 | 792 | | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
796 | 810 | | |
797 | 811 | | |
798 | 812 | | |
| |||
810 | 824 | | |
811 | 825 | | |
812 | 826 | | |
813 | | - | |
| 827 | + | |
814 | 828 | | |
815 | 829 | | |
816 | 830 | | |
| |||
845 | 859 | | |
846 | 860 | | |
847 | 861 | | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
| 862 | + | |
| 863 | + | |
852 | 864 | | |
853 | 865 | | |
854 | 866 | | |
| |||
921 | 933 | | |
922 | 934 | | |
923 | 935 | | |
924 | | - | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
930 | 942 | | |
931 | 943 | | |
932 | 944 | | |
| |||
Lines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
| |||
496 | 504 | | |
497 | 505 | | |
498 | 506 | | |
499 | | - | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
500 | 510 | | |
501 | 511 | | |
502 | 512 | | |
| |||
509 | 519 | | |
510 | 520 | | |
511 | 521 | | |
512 | | - | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
513 | 525 | | |
514 | 526 | | |
515 | 527 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8775 | 8775 | | |
8776 | 8776 | | |
8777 | 8777 | | |
8778 | | - | |
8779 | | - | |
8780 | | - | |
| 8778 | + | |
| 8779 | + | |
| 8780 | + | |
| 8781 | + | |
| 8782 | + | |
| 8783 | + | |
| 8784 | + | |
| 8785 | + | |
| 8786 | + | |
8781 | 8787 | | |
8782 | 8788 | | |
8783 | 8789 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
0 commit comments