On 2/3/25 8:19 PM, Dmitry Melekhov via dovecot wrote:
Are you sure you patched both sides?
No, did not patch the far side, just the side where I configured the replicator to run. (Can the replicator run on both sides? Do they play nicely if both replicating to the other?)
Yes, it can run on both sides.
Don't know how it works though...
At the moment I have replication running on one end and it seems to be /mostly/ working. I do get fairly rare:
Warning: Failed to do incremental sync for mailbox INBOX …messages in the log, but very few as a ratio to sync attempts, as whatever the problem is /seems/ to work itself out. I hope.
Running two-sided replication seems a harder problem than running one-sided. So I don't think I trust running replication on both sides.
I thought Dovecot was a mature program and replication a real feature, but to get replication working this well I needed to take a kindly suggested patch, compile and try it, see it was still broken, stare at the patch and realize the suggested patch was also broken, and make my own stab at something that wasn't an obvious leak…but isn't necessarily correct, either.
I posted my code change to the list…but got no response. I fear am in obscure territory here and no one really knows nor has the time to investigate. I'm worried that replication is deleted from version 2.4 because it didn't entirely work in my version 2.3, but it was too broken to properly fix.
I don't mind an occasional error message like the one above, I don't mind occasionally being out of sync for a short time, but I do *not* want to lose data. Will I?
-kb
P.S. Soapbox rant: After looking at the code in the function I was messing with I could see it was clearly broken as it was, and was broken in the suggested patch, and I don't know if my change is good and makes sense. I see various stuff there that might or might not be correct, it would be a lot of work to understand it all and find out. And then I lament that were it written in Rust a lot of bugs simply could not be there——because the compiler would do that analysis and complain. Yes, I realize Dovecot is too old to have been written in Rust, but something like https://stalw.art/ is not too old. If my Dovecot set up works I'll let it run, I hope it will run happily for a few years, because I don't want to start over. But when it /is/ time to replace things…