> --
> 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.
>
>
On Mon, Feb 21, 2011 at 5:45 PM, Andrew Armstrong <phpl...@gmail.com> wrote:
> Writing (which needs to go to the primary) and then trying to read
> from slaves (slaveOk() query) would also have a chance of not picking
> up the recently saved document I would imagine (since the replica
> slave you're reading from may be behind by a few ms and not yet
> received the write from the primary).
>
> So either you need to write and then read from the primary (dont use
> slaveOk()) or perhaps getLastError(w: <amount of slaves + 1>) to
> ensure the document was written on all slaves too, before then trying
> a slaveOk query.
>
> Does that sound right Eliot?