Heads-up on a Merge Replication Bug in SQL Server 2005 involving Precomputed Partitions: "The case of the missing customer orders"Customer Joe Bloggs starts trading in the USA. The USA division creates a customer record and then mark his customer record that he is owned by the USA division. All of Joe Bloggs’ s data resides only on the USA server. The diagram below shows this in data terms. The merge replication horizontal/join filters achieve this.
Joe Bloggs then opens a store in the UK as well as the USA so the USA division
change his customer record so that Joe Bloggs is joint owned by both the UK and
the USA division – they should both be able to see his orders after this change
BUT the UK only receives the customer record for Joe Bloggs, none of his orders
are transferred onto the UK server. The merge process has copied the customer
record to the UK, but none of his orders!
Technical DetailHere are my findings: since I don't know what causes the problem (eg type, complexity of filtering) I do not know whether you will be affected or not. I will post up when MS have found the root cause. ISSUE Non-convergence on merge publication if the same articles are shared between two (or more) publications and the articles have parent-child relationship through join filters with pre-computed partitions set (the default for most) partitioned publications. The publications in this repro have static horizontal filters. If you update one row in the parent table at one of the subscribers which qualifies for the partition of the second publication/subscription then the parent row gets downloaded but the child row(s) does not get downloaded on the second subscriber. Dynamic filters were not tested. Versions affected by bug
SQL2000 SP4 - OK
(uses setupbelongs) WORKAROUND Warning – you will need to create a new publication for this to work with pre-computed partitions switched off at time of creation (below), at least that is what my testing points to – you will need to verify in your own test environment what works for you
Addendum, 17th July 2007: Fix for SQL2005 merge pre-computed bug
This bug is fixed in build 3177 (KB 938363, not available when this was
originally published). Note that you must run (the new for SP2)
sp_vupgrade_mergeobjects to realise the fix. This was a regression bug
arising from a fix to another bug relating to false conflicts that had been
posted in the forums. It’s good to know that bug reports in the forums are
taken seriously, but less so when the fix itself creates non convergence!
Also worrying is the fact that this partition change scenario was not
already in the product testing suite. I would have thought this would be a
basic test. As I understand it when a bug is fixed the product team have to
add the bug scenario to the testing suite to avoid having the same issue
again. |
Paul Ibison, Copyright © 2009 |