This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Description
A merge document of [1.xml, 2.xml, 3.xml] is saved if matching on id1 and id2 for:
a. 1.xml with id1=1 and id2=A
b. 2.xml with id1=2 and id2=A
c. 3.xml with id1=1 and id2=C
d. 4.xml with id1=4 and id2=D
This save sometimes fails with a conflicting update error because the consolidation logic before saving tries to consolidate [1.xml, 2.xml], [1.xml, 2.xml, 3.xml], [1.xml, 3.xml] into [1.xml, 2.xml, 3.xml] in a buggy manner. One can start tracing the bug as starting at the let $merged-uris := map:keys($consolidated-merges) line in process.xqy's proc-impl:process-match-and-merge-with-options method.