Commit 89e4cf8
committed
skipDuplicates: drop deferred-relationships, inline pre-filter, tighten comments
The deferred-relationships mechanism was useful when the adapter could
report which docs were actually inserted (via reconciliation/
upsertWithCounts). With those gone, $batch always equals $chunk, so the
defer-then-match dance is dead weight. The orchestrator already pre-
filters known duplicates upfront, so any survivor is expected to insert
and relationships can be created inline like the non-skipDuplicates path.
- Database.php: pre-filter $documents once, before encode/validate,
instead of filtering each chunk inline. Drop $deferredRelationships
scaffolding and the per-chunk match loop. Collapse if/elseif into
one inline createDocumentRelationships call.
- Mongo.php: tighten withTransaction skipDuplicates comment (the
"relationship writes are deferred" rationale is no longer accurate).
- Mirror.php: tighten the captureOnNext comment.
- composer.lock: revert unrelated symfony-polyfill-php85 / mongo 1.0.0→
1.0.2 bumps that crept in from an earlier composer update.
Race window unchanged: a doc that passes pre-filter but loses to a
concurrent insert still produces an orphan relationship and an
over-counted $modified — same as before this commit.1 parent eb99cf1 commit 89e4cf8
4 files changed
Lines changed: 28 additions & 84 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 125 | + | |
129 | 126 | | |
130 | 127 | | |
131 | 128 | | |
| |||
1500 | 1497 | | |
1501 | 1498 | | |
1502 | 1499 | | |
1503 | | - | |
1504 | | - | |
1505 | | - | |
1506 | | - | |
1507 | | - | |
| 1500 | + | |
1508 | 1501 | | |
1509 | 1502 | | |
1510 | 1503 | | |
| |||
1517 | 1510 | | |
1518 | 1511 | | |
1519 | 1512 | | |
1520 | | - | |
1521 | | - | |
| 1513 | + | |
1522 | 1514 | | |
1523 | 1515 | | |
1524 | 1516 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5748 | 5748 | | |
5749 | 5749 | | |
5750 | 5750 | | |
5751 | | - | |
| 5751 | + | |
| 5752 | + | |
5752 | 5753 | | |
5753 | 5754 | | |
5754 | 5755 | | |
| |||
5763 | 5764 | | |
5764 | 5765 | | |
5765 | 5766 | | |
5766 | | - | |
5767 | | - | |
5768 | | - | |
5769 | | - | |
5770 | | - | |
5771 | | - | |
5772 | | - | |
5773 | | - | |
5774 | | - | |
5775 | 5767 | | |
5776 | | - | |
5777 | | - | |
5778 | | - | |
5779 | | - | |
5780 | | - | |
| 5768 | + | |
| 5769 | + | |
| 5770 | + | |
| 5771 | + | |
| 5772 | + | |
| 5773 | + | |
| 5774 | + | |
5781 | 5775 | | |
5782 | 5776 | | |
5783 | 5777 | | |
| |||
5819 | 5813 | | |
5820 | 5814 | | |
5821 | 5815 | | |
5822 | | - | |
5823 | | - | |
5824 | | - | |
5825 | | - | |
5826 | | - | |
5827 | | - | |
5828 | | - | |
5829 | | - | |
5830 | | - | |
5831 | | - | |
5832 | | - | |
5833 | | - | |
5834 | | - | |
5835 | | - | |
5836 | | - | |
| 5816 | + | |
5837 | 5817 | | |
5838 | 5818 | | |
5839 | 5819 | | |
5840 | 5820 | | |
5841 | 5821 | | |
5842 | 5822 | | |
5843 | 5823 | | |
5844 | | - | |
5845 | | - | |
5846 | | - | |
5847 | | - | |
5848 | | - | |
5849 | | - | |
5850 | | - | |
5851 | | - | |
5852 | | - | |
5853 | | - | |
5854 | | - | |
5855 | | - | |
| 5824 | + | |
5856 | 5825 | | |
5857 | 5826 | | |
5858 | 5827 | | |
5859 | 5828 | | |
5860 | 5829 | | |
5861 | | - | |
5862 | | - | |
5863 | | - | |
5864 | | - | |
5865 | | - | |
5866 | | - | |
5867 | | - | |
5868 | | - | |
5869 | | - | |
5870 | | - | |
5871 | | - | |
5872 | | - | |
5873 | | - | |
5874 | | - | |
5875 | | - | |
5876 | 5830 | | |
5877 | 5831 | | |
5878 | 5832 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
| 604 | + | |
| 605 | + | |
608 | 606 | | |
609 | 607 | | |
610 | 608 | | |
| |||
0 commit comments