You can mark each secondary as hidden before you upgrade it but most
clients/driver have a connection pool so they have long lived
connections. It sounds like you are doing
slaveOk/ReadPreferences.SECONDARY queries so this is probably a good
idea. Different drivers will handle this better or worse in terms of
exposing the socket/connection error to your application; what
language are you using?
Your application must be written to reconnect/retry since there are
any number of transient (network) errors which could come up much like
the rolling upgrade process during normal operation.
As with the case of no primary for a short period of time, that is
unavoidable and your application needs to handle that as well. Not
every application wants the same behavior, and there is no one answer
to that question -- what should the app do if it can't write.
On Mon, Jun 18, 2012 at 1:10 PM, Oskar Liljeblad <
os...@osk.mine.nu> wrote:
> It is possible to upgrade a MongoDB replica set without downtime? The reason
> I ask is because I followed the instructions on
>
http://www.mongodb.org/display/DOCS/2.0+Release+Notes#2.0ReleaseNotes-Upgrading
> to upgrade secondaries, then use db.shutdownServer() on primary. The only
> problem is that when I shut down the secondary, existing (read-only) client
> connections were disconnected. And when I issued db.shutdownServer() on the
> primary, there was small delay (10-20 seconds or so) when no server was
> primary (or so at least it seemed). Is it possible to slowly drain
> connection from a server?
>
> Regards,
>
> Oskar Liljeblad
>
> --
> 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
> See also the IRC channel --
freenode.net#mongodb