1. MongoDB will allow a concurrent reader to see the result of the write operation before the write is acknowledged to the client application. For details on when writes are acknowledged for different write concern levels, see Write Concern (page 78). 

2. Reads can see data which may subsequently be rolled back in rare cases such as replica set failover or power loss. It does not mean that read operations can see documents in a partially written or otherwise inconsistent state. 

Other systems refer to these semantics as read uncommitted . 

## 11.5 FAQ: Sharding with MongoDB 

This document answers common questions about horizontal scaling using MongoDB’s sharding . 

If you don’t find the answer you’re looking for, check the complete list of FAQs (page 743) or post your question to the MongoDB User Mailing List$^{20}$. 

## 11.5.1 Is sharding appropriate for a new deployment? 

Sometimes. 

If your data set fits on a single server, you should begin with an unsharded deployment. 

Converting an unsharded database to a sharded cluster is easy and seamless, so there is little advantage in configuring sharding while your data set is small. 

Still, all production deployments should use replica sets to provide high availability and disaster recovery. 

## 11.5.2 How does sharding work with replication? 

To use replication with sharding, deploy each shard as a replica set . 

## 11.5.3 Can I change the shard key after sharding a collection? 

No. 

There is no automatic support in MongoDB for changing a shard key after sharding a collection. This reality un- derscores the importance of choosing a good shard key (page 674). If you must change a shard key after sharding a collection, the best option is to: 

• dump all data from MongoDB into an external format. 

• drop the original sharded collection. 

• configure sharding using a more ideal shard key. 

• pre-split (page 722) the shard key range to ensure initial even distribution. 

• restore the dumped data into MongoDB. 

See shardCollection , sh.shardCollection() , the Shard Key (page 674), Deploy a Sharded Cluster (page 691), and SERVER-4000 21 for more information. 

