Hi Ian, On Mon, Aug 8, 2016 at 3:41 PM, Ian Boston <[email protected]> wrote: > > If every successful commit writes the root node, due to every update > updating a sync prop index, this leaves me wondering how the delayed sync > reduces the writes to the root node ? > > I thought the justification of the 1s sync operation was to reduce the > writes to the root node to n/s where n is the number of instances in the > cluster, however based on what you are telling me the rate is (m+n)/s where > m is the total commits per second of the whole cluster. I understand that > the update to test for a conflicted commit may not be the same as the > update of _lastRevs, but in MongoDB both update the MongoDB document. >
I'm not sure of the exact numbers around how MongoDB would perform for lots of edits to the same document. There's a bit of difference between _lastRev write and commit-root conditional update - commit-root update is a change on a sub-document... so, something like 'set "_revision.rX"="c" on _id=0:/ iff "_conflict.rX"' doesn't exist. While last rev updates change the same key across commits from the same cluster node - something like 'set "_lastRevs.r0-0-X"="rY-0-X" '. I think the idea is to avoid any conflict on MongoDB's update statements. I'm not sure if such edits (edits to same doc but at a different sub-doc/key) degrade performance badly. Thanks, Vikas PS: I wonder if we should open a different thread as it seems to be digressing from the subject :)
