When synchronising between two masters and one slave (client sensitive
information sanitised, of course):

group cluster {
        host server1 server2 (backup);
        key /etc/csync2.key;
        include /var/www/htdocs;
        auto younger;
}


I've been seeing a great many errors like this on both sides:

While syncing file
/var/www/htdocs/wp-content/themes/wireframe/widgets/search_widget.php:
ERROR from peer server1: File is also marked dirty here!
Do not auto-resolve conflict: Lost 'younger/older' test.


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'm seeing it
on both sides, and I'm seeing it for files that haven't changed recently. I
believe the cause is that the files' timestamps one one server have been
updated by an external rsync, but the contents weren't changed at all.

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's nothing to sync, and clear the dirty flag for that file in its
local database.

Second, I suggest the following line be changed:
http://git.linbit.com/csync2.git/blob/HEAD:/update.c#l553

from

if ((localdata > remotedata) ==


to:

if ((localdata >= remotedata) ==


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.


*Marcus Downing*
mar...@bang-on.net
_______________________________________________
Csync2 mailing list
Csync2@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/csync2

Reply via email to