发布于 2015-09-14 15:03:01 | 223 次阅读 | 评论: 0 | 来源: 网络整理
| 参数: | 
 | 
|---|
Initiates a replica set. Optionally takes a configuration argument in the form of a document that holds the configuration of a replica set. Consider the following model of the most basic configuration for a 3-member replica set:
{
    _id : <setname>,
     members : [
         {_id : 0, host : <host0>},
         {_id : 1, host : <host1>},
         {_id : 2, host : <host2>},
     ]
}
This function provides a wrapper around the “replSetInitiate” database command.