一.检查集群状态 1.1 使用sh.status()查看集群摘要信息 1.使用sh.status()可以查看分片信息.数据库信息.集合信息 sh.status() 如果数据块较多时,使用sh.status(true) 又是输出会很多,就不会截断,要使用如下查看 2.too many chunks to print, use verbose if you want to force print 可通过执行以下命令查看 printShardingStatus(db.getSisterDB("conf…
In sharded clusters, if you do not use the _id field as the shard key, then your application must ensure the uniqueness of the values in the _id field to prevent errors. This is most-often done by using a standard auto-generated ObjectId. 在分片中,也要保证ob…