From 81cc01c9587a05178c84832876a8142faf6d9763 Mon Sep 17 00:00:00 2001 From: Petr Jelinek Date: Thu, 23 Oct 2014 09:04:13 +0200 Subject: [PATCH] bdr: Don't try to handle UPDATE/UPDATE conflicts in UDR. --- bdr_apply.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/bdr_apply.c b/bdr_apply.c index 01a247b1cf..b76f2cc2f4 100644 --- a/bdr_apply.c +++ b/bdr_apply.c @@ -1113,7 +1113,7 @@ bdr_conflict_last_update_wins(RepNodeId local_node_id, static void bdr_conflict_default_apply_resolve(bool *perform_update, bool *log_update, - BdrConflictResolution *resolution) + BdrConflictResolution *resolution) { *perform_update = bdr_conflict_default_apply; /* For UDR conflicts are never expected so they should always be logged. */ @@ -1170,6 +1170,19 @@ check_apply_update(BdrConflictType conflict_type, return; } +#ifdef BUILDING_UDR + /* + * In UDR we can't correctly detect UPDATE/UPDATE conflicts as we don't + * have origin_id which means every UPDATE looks like conflict so let's + * just ignore them here. + */ + if (conflict_type == BdrConflictType_UpdateUpdate) + { + *perform_update = true; + return; + } +#endif + /* * Decide whether to keep the remote or local tuple based on a conflict * trigger (if defined) or last-update-wins. -- 2.39.5