MongoDB: deal with replicaset