The autobuild test system (on sn-devel-144) has detected an intermittent failing test in the current master tree.
The autobuild log of the failure is available here: http://git.samba.org/autobuild.flakey.sn-devel-144/2017-09-26-1357/flakey.log The samba build logs are available here: http://git.samba.org/autobuild.flakey.sn-devel-144/2017-09-26-1357/samba.stderr http://git.samba.org/autobuild.flakey.sn-devel-144/2017-09-26-1357/samba.stdout The top commit at the time of the failure was: commit 0d4c3e5e3fd379b35645d5d10f9705116eba4197 Author: Tim Beale <timbe...@catalyst.net.nz> Date: Thu Sep 14 16:34:59 2017 +1200 replmd: RMD_VERSION incorrectly incremented for link conflicts This problem was noticed when 2 DCs added the same linked attribute at roughly the same time. One DC would have a later timestamp than the other, so it would re-apply the same link information. However, when it did this, replmd_update_la_val() would incorrectly increment the RMD_VERSION for the attribute. We then end up with one DC having a higher RMD_VERSION than the others (and it doesn't replicate the new RMD_VERSION out). During replication RMD_VERSION is used to determine whether a linked attribute is old (and should be ignored), or whether the information is new and should be applied to the DB. This RMD_VERSION discrepancy could potentially cause a subsequent linked attribute update to be ignored. Normally when a local DB operation is performed, we just pass in a version of zero and get replmd_update_la_val() to increment what's already in the DB. However, we *never* want this to happen during replication - we should always use the version we receive from the peer DC. This patch fixes the problem by separating the API into two: - replmd_update_la_val(): we're updating a linked attribute in the DB, and so as part of this operation we always want to increment the version number (the version no longer need to be passed in because we can work it out from the existing DB entry). - replmd_set_la_val(): we want to set a linked attribute to use the exact values we're telling it, including the version. This is what replication needs to use. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13038 Signed-off-by: Tim Beale <timbe...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abart...@samba.org> Autobuild-Date(master): Tue Sep 26 09:36:48 CEST 2017 on sn-devel-144