MongoDB Documentation, Release 3.0.4 1. Upgrade the secondary members of the set one at a time by shutting down the mongod and replacing the 2.0 binary with the 2.2 binary. After upgrading a mongod instance, wait for the member to recover to SECONDARY state before upgrading the next instance. To check the member’s state, issue rs.status() in the mongo shell. 2. Use the mongo shell method rs.stepDown() to step down the primary to allow the normal failover (page 580) procedure. rs.stepDown() expedites the failover procedure and is preferable to shutting down the primary directly. Once the primary has stepped down and another member has assumed PRIMARY state, as observed in the output of rs.status() , shut down the previous primary and replace mongod binary with the 2.2 binary and start the new process. Note: Replica set failover is not instant but will render the set unavailable to read or accept writes until the failover process completes. Typically this takes 10 seconds or more. You may wish to plan the upgrade during a predefined maintenance window. Use the following procedure to upgrade a sharded cluster: Note: Balancing is not currently supported in mixed 2.0.x and 2.2.0 deployments. Thus you will want to reach a consistent version for all shards within a reasonable period of time, e.g. same-day. See SERVER-6902 826 for more information. Aggregation Framework The aggregation framework makes it possible to do aggregation operations without need- ing to use map-reduce . The aggregate command exposes the aggregation framework, and the aggregate() helper in the mongo shell provides an interface to these operations. Consider the following resources for background on the aggregation framework and its use: $^{826}$https://jira.mongodb.org/browse/SERVER-6902 • Documentation: Aggregation Concepts (page 439) • Reference: Aggregation Reference (page 469) • Examples: Aggregation Examples (page 452) • re-enable the balancer. • Upgrade each shard’s replica set, using the upgrade procedure for replica sets (page 900) detailed above. • Upgrade all of the mongod config server instances using the stand alone (page 900) procedure. To keep the cluster online, be sure that at all times at least one config server is up. • Upgrade all mongos instances first , in any order. • Disable the balancer (page 717). Changes Major Features Upgrading a Sharded Cluster 901 12.2. Previous Stable Releases