I've been playing with replica pairs and read through
http://www.mongodb.org/display/DOCS/Pairing+Internals to try and
understand how eventual consistency is achieved.
I should say firstly that I don't entirely understand the Pairing
Internals document. :) However, ignoring my failure to understand, what
I'm trying to ascertain is that after a replica pair has synced up, what
condition should I expect the "final" database to be in, assuming no
further modifications are happening during the sync process (for the
sake of simplicity).
For example if I have a replica pair, L and R, and L is currently the
master, then:
1. I insert an object {z:1, a:1} into L, then L goes "offline" to R
before the operation is replicated (network partition, or maybe L dies
for some reason), R is now the new master
2. I insert an object {z:1, b:1} into R as the new master
3. I do a remove( {z:1} ) on R
4. Now L comes back up, and I observe that R has the object {z:1, a:1},
even though according to step 3, there should be no objects containing
{z:1}.
I tried this out with 1.3.2 and it as I've written so this isn't just
theoretical. Is this the expected behaviour or a bug?
What I'm really wondering about is whether there are other cases where
the resultant consistent DB is maybe not as the end-user would expect
(in this case neither of the {z:1} objects should exist). Which made me
wonder if I understand the definition of eventually consistent. :)
cheers,
yun
--
Yun Huang Yong
y...@nomitor.com ...nom nom nom
+61 408 131 419
--
--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.