So, why aren't callbacks supported for queued sync responses?
Hi David, replication scenarios generally assume that the underlying data is sent unchanged, so noone has considered this scenario. To confirm: when you set up e.g. rwm to munge DNs, the entries sent during persist phase are not transformed either?
That is the answer I expected, and it makes sense, but sync searches can be used for more than just replication. Overlays can and do modify the underlying data, and I've confirmed this with a simple searchEntryDN rwm-rewriteRule:
===== ldapsearch -b dc=vt,dc=edu -E sync=rp uid=dhawes 1.1 2>/dev/null # extended LDIF # # LDAPv3 # base <dc=vt,dc=edu> with scope subtree # filter: uid=dhawes # requesting: 1.1 #
# dhawes, rwmPeople, vt.edu dn: uid=dhawes,ou=rwmPeople,dc=vt,dc=edu control: 1.3.6.1.4.1.4203.1.9.1.2 false MBUKAQEEEKpW9nz7TBA+jm2HJeiBW80= # SyncState control, UUID aa56f67c-fb4c-103e-8e6d-8725e8815bcd added
# SyncInfo Received: refresh delete # cookie: rid=000,csn=20240910002202.039752Z#000000#000#000000 # refresh done, switching to persist stage
# dhawes, People, vt.edu dn: uid=dhawes,ou=People,dc=vt,dc=edu control: 1.3.6.1.4.1.4203.1.9.1.2 false MEsKAQIEEKpW9nz7TBA+jm2HJeiBW80ENHJpZD 0wMDAsY3NuPTIwMjQwOTEwMDA0NjE0Ljg1OTM5MlojMDAwMDAwIzAwMCMwMDAwMDA= # SyncState control, UUID aa56f67c-fb4c-103e-8e6d-8725e8815bcd modified # cookie: rid=000,csn=20240910004614.859392Z#000000#000#000000
# numResponses: 3 # numEntries: 2 # numPartial: 1 =====
As with my custom overlay, the results are inconsistent, which is my primary concern. If the callbacks were always called or never called for sync searches, I think that would make sense and do away with this inconsistency.
I noticed that valsort doesn't handle syncrepl responses [2], and I wonder if the reason is because the results may be inconsistent, as I am experiencing.
Feel free to file an ITS with a way to reproduce, if you can propose a patch to achieve this (along with an enhancement to the test suite that makes sure it's tested going forward), that would be much appreciated.
Were you specifically referencing valsort here, or callbacks in general?
Thanks, I appreciate the help.