|
configurable as:
myrs:PRIMARY> config = rs.config()
|
{
|
"_id" : "myrs",
|
"version" : 14,
|
"members" : [
|
{
|
"_id" : 0,
|
"host" : "hingo-sputnik:27001"
|
},
|
{
|
"_id" : 1,
|
"host" : "hingo-sputnik:27002"
|
},
|
{
|
"_id" : 2,
|
"host" : "hingo-sputnik:27003"
|
}
|
]
|
}
|
myrs:PRIMARY> config["settings"] = { heartbeatTimeoutSecs : 2 }
|
{ "heartbeatTimeoutSecs" : 2 }
|
myrs:PRIMARY> config
|
{
|
"_id" : "myrs",
|
"version" : 14,
|
"members" : [
|
{
|
"_id" : 0,
|
"host" : "hingo-sputnik:27001"
|
},
|
{
|
"_id" : 1,
|
"host" : "hingo-sputnik:27002"
|
},
|
{
|
"_id" : 2,
|
"host" : "hingo-sputnik:27003"
|
}
|
],
|
"settings" : {
|
"heartbeatTimeoutSecs" : 2
|
}
|
}
|
myrs:PRIMARY> rs.reconfig(config)
|
{ "ok" : 1 }
|
// Just to verify it sticks:
|
myrs:PRIMARY> rs.config()
|
{
|
"_id" : "myrs",
|
"version" : 15,
|
"members" : [
|
{
|
"_id" : 0,
|
"host" : "hingo-sputnik:27001"
|
},
|
{
|
"_id" : 1,
|
"host" : "hingo-sputnik:27002"
|
},
|
{
|
"_id" : 2,
|
"host" : "hingo-sputnik:27003"
|
}
|
],
|
"settings" : {
|
"heartbeatTimeoutSecs" : 2
|
}
|
}
|
|