mmm
mmm copied to clipboard
Document ownership/update propagation between two hosts
Synopsis:
Two hosts, one 64-bit Windows & OS, one virtualized Windows Server 2003. Python 2.7, PIP, YAML and MongoMultiMaster installed.
YAML test.yml is as follows: (this duplicated on both hosts)
server_a: id: 'FAF76B96-798C-11D2-AAD1-006008C78BC7' uri: 'mongodb://localhost:27017' server_b: id: '564D3A1B-E453-A92A-FFD1-4238B2CAE8D0' uri: 'mongodb://jack:27017'
(Jack is the VM)
MongoMultiMaster started identically on each host as follows:
python mmm -c test.yml clear-config (responded y) python mmm -c test.yml dump-config python mmm -c test.yml replicate --src=server_a/test.foo --dst=server_b/test.foo python mmm -c test.yml dump-config python mmm -c test.yml replicate --src=server_b/test.foo --dst=server_a/test.foo python mmm -c test.yml dump-config python mmm -c test.yml run
Two MongoDB master's replicated locally.
Problem :
A.When host A inserts a document into foo, the document gets propagated to host B, however when host B updates the document it received, the updates occuring on B don't propagate back to A.
B.The same is true when B creates the document, passes it to A and then A updates - the updates don't pass back to B.
I have discovered, since emailing that removal of the _mmm field, will allow return propagation.
8/27/2012 - master<>master<>master replication configured successfully.
The same situation prevails, however insofar as the need to remove the _mmm field before host propagation post update can occur. This means that if a document has a blank _mmm field, then the host owning that collection can propagate changes. If the _mmm field is not blank, to update and have these propagate to other masters requires removing the _mmm field from the document during the update operation.