<div dir="ltr"><div>When synchronising between two masters and one slave (client sensitive information sanitised, of course):</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><font face="monospace, monospace">group cluster {</font></div></div><div><div><font face="monospace, monospace">        host server1 server2 (backup);</font></div></div><div><div><font face="monospace, monospace">        key /etc/csync2.key;</font></div></div><div><div><font face="monospace, monospace">        include /var/www/htdocs;</font></div></div><div><div><font face="monospace, monospace">        auto younger;</font></div></div><div><div><font face="monospace, monospace">}</font></div></div></blockquote><div><br></div><div>I&#39;ve been seeing a great many errors like this on both sides:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><font face="monospace, monospace">While syncing file /var/www/htdocs/wp-content/themes/wireframe/widgets/search_widget.php:</font></div></div><div><div><font face="monospace, monospace">ERROR from peer server1: File is also marked dirty here!</font></div></div><div><div><font face="monospace, monospace">Do not auto-resolve conflict: Lost &#39;younger/older&#39; test.</font></div></div></blockquote><div><br></div><div>I understand that csync2 is push only, and this error is expect whenever the other server has more recent changes than we do. However, I&#39;m seeing it on both sides, and I&#39;m seeing it for files that haven&#39;t changed recently. I believe the cause is that the files&#39; timestamps one one server have been updated by an external rsync, but the contents weren&#39;t changed at all.</div><div><br></div><div>I suggest two changes to fix this. First, csync2 needs to recognise that the content, timestamp and other attributes of a file are identical, ie that there&#39;s nothing to sync, and clear the dirty flag for that file in its local database.</div><div><br></div><div>Second, I suggest the following line be changed: <a href="http://git.linbit.com/csync2.git/blob/HEAD:/update.c#l553">http://git.linbit.com/csync2.git/blob/HEAD:/update.c#l553</a></div><div><br></div><div>from</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;white-space:pre">if ((localdata &gt; remotedata) ==</span></div></blockquote><div><br></div><div>to:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;white-space:pre">if ((localdata &gt;= remotedata) ==</span></div></blockquote><div><br></div><div>which is to say, if the timestamps on the two sides are the same it considers itself to have won the conflict and proceeds to sync successfully.</div><div><br></div><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><b><font color="#660000">Marcus Downing</font></b><div><a href="mailto:marcus@bang-on.net" target="_blank" onclick="window.open(&#39;https://mail.google.com/mail/?view=cm&amp;tf=1&amp;to=marcus@bang-on.net&amp;cc=&amp;bcc=&amp;su=&amp;body=&#39;,&#39;_blank&#39;);return false;">marcus@bang-on.net</a></div><div><br></div></div></div></div>
</div>