Description
For big documents, goxdcr does non-optimistic replication. i.e., it first retrieves metadata from target, does conflict resolution on source side, and replicates the document to target only when conflict resolution succeeds. This functionality is broken now due to an oversight in xmem_nozzle.go:
xmem.batch.bigDoc_noRep_map = bigDoc_noRep_map
should have been
batch.bigDoc_noRep_map = bigDoc_noRep_map
As a result, even though we did do source side conflict resolution, we effectively discarded the results and always sent docs to target, which defeated the purpose of optimistic replications. The result is not document loss but wasted work.