Mongodb – Sharded DB accidentally created during update of MongoDB from 2.4.4 to 2.6.4

mongodbsharding

I am upgrading mongo version 2.4 to 2.6
I was able to upgrade my complete cluster except one primary member of my replica set
during this period my auto running script created a sharded db.

I can not delete this db as it has important data. I wanted to confirm that i can still continue with the upgrade process for last remaining server will it create an issue.
I have completed upgrade of all mongos and config server before this.

Please let me know the impact if it will be there.

Best Answer

If all the other components are upgraded, then there will be no impact to the sharded database caused by upgrading the remaining primary. The important pieces for the sharded database/collection are mongos and the config servers rather than the individual members in this case, and you have already done that piece.

If you want to be particularly careful, you can leave the primary on 2.4, step it down and allow a 2.6 secondary to step up to primary (this would be the recommended process anyway, you should always step down a primary to secondary before you upgrade it). Doing it this way also means you have a very simple way to roll back the upgrade if necessary. Once you verify no issues, upgrade the old priamry (now secondary) and you are done.

One caveat - stepping down a primary will force close all active connections (mongos, config servers mainly) to that primary, and they will re-establish connections to the new primary once it is elected. This is expected (and necessary in fact) behavior, but can cause a brief spate of errors (for example for a long running query from that shard, which would error).