On Fri, Sep 06, 2024 at 06:46:41PM +0000, Hawes, David wrote:
I have a custom overlay that registers a callback to rewrite attribute values for searches. I noticed that it was not working for refreshAndPersist sync searches for queued responses, and the reason for this is that there are no callbacks registered in syncprov_qtask() [1]. I'd see the initial responses come through with rewritten attributes, but later responses would not be rewritten.
I had some success adding the callbacks back, but it was a bit of a minefield. Before investigating further, I was hoping to understand why the decision was made to not set callbacks in syncprov_qtask(). For now I'm operating under the assumption that this is simply not supported.
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?
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.
Thanks,