Commit 78529fe
(fix): CI — propagate skipDuplicates through Database → Adapter → Permissions hook
The feat-query-lib branch merged skipDuplicates support into Mirror / Adapter
but the Database layer's skipDuplicates(callback) only flipped a dynamic
property and never propagated to the adapter, so INSERT IGNORE was never
emitted.
- Database: declare protected bool $skipDuplicates so the flag is real.
- Traits/Documents::createDocuments: when $this->skipDuplicates is set,
wrap each batch with $this->adapter->skipDuplicates(...) so the adapter
flag is live during the INSERT.
- Hook/WriteContext: add a bool $skipDuplicates field so write hooks can
see the mode in effect for the parent INSERT.
- Adapter/SQL::buildWriteContext: pass the adapter's $skipDuplicates
through to the context.
- Hook/Permissions::afterDocumentCreate: use $permBuilder->insertOrIgnore()
when the context signals skipDuplicates. Without this, destination
backfill under skipDuplicates hit 1062 on the _perms unique index when
a row already existed on source with the same permissions.
Verified: MirrorTest now green (653 tests, 0 failures).1 parent 3f277c1 commit 78529fe
5 files changed
Lines changed: 10 additions & 4 deletions
File tree
- src/Database
- Adapter
- Hook
- Traits
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2919 | 2919 | | |
2920 | 2920 | | |
2921 | 2921 | | |
| 2922 | + | |
2922 | 2923 | | |
2923 | 2924 | | |
2924 | 2925 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| 301 | + | |
| 302 | + | |
301 | 303 | | |
302 | 304 | | |
303 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
559 | | - | |
560 | | - | |
561 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
562 | 563 | | |
563 | 564 | | |
564 | 565 | | |
| |||
0 commit comments