I'm trying to configure a MongoDB replicaset with 3 replicas. The primary and another use the in memory storage engine, and the third uses wired tiger. I am using this configuration.
When I restart the cluster the data does not persist.
Server has startup warnings:
** WARNING: This replica set node is running without journaling enabled but the
** writeConcernMajorityJournalDefault option to the replica set config
** is set to true. The writeConcernMajorityJournalDefault
** option to the replica set config must be set to false
** or w:majority write concerns will never complete.
** In addition, this node's memory consumption may increase until all
** available free RAM is exhausted.
** WARNING: This replica set node is using in-memory (ephemeral) storage with the
** writeConcernMajorityJournalDefault option to the replica set config
** set to true. The writeConcernMajorityJournalDefault option to the
** replica set config must be set to false
** or w:majority write concerns will never complete.
** In addition, this node's memory consumption may increase until all
** available free RAM is exhausted.
And my configuration.
rs0:PRIMARY> cfg = rs.conf()
{
"_id" : "rs0",
"version" : 102744,
"protocolVersion" : NumberLong(1),
"writeConcernMajorityJournalDefault" : false,
"members" : [
{
"_id" : 0,
"host" : "mongodb-mongodb-replicaset-0.mongodb-mongodb-replicaset.default.svc.cluster.local:27017",
"arbiterOnly" : false,
"buildIndexes" : true,
"hidden" : false,
"priority" : 1,
"tags" : {
},
"slaveDelay" : NumberLong(0),
"votes" : 1
},
{
"_id" : 1,
"host" : "mongodb-mongodb-replicaset-1.mongodb-mongodb-replicaset.default.svc.cluster.local:27017",
"arbiterOnly" : false,
"buildIndexes" : true,
"hidden" : false,
"priority" : 1,
"tags" : {
},
"slaveDelay" : NumberLong(0),
"votes" : 1
},
{
"_id" : 2,
"host" : "mongodb-mongodb-replicaset-2.mongodb-mongodb-replicaset.default.svc.cluster.local:27017",
"arbiterOnly" : false,
"buildIndexes" : true,
"hidden" : true,
"priority" : 0,
"tags" : {
},
"slaveDelay" : NumberLong(0),
"votes" : 1
}
],
"settings" : {
"chainingAllowed" : true,
"heartbeatIntervalMillis" : 2000,
"heartbeatTimeoutSecs" : 10,
"electionTimeoutMillis" : 10000,
"catchUpTimeoutMillis" : -1,
"catchUpTakeoverDelayMillis" : 30000,
"getLastErrorModes" : {
},
"getLastErrorDefaults" : {
"w" : 1,
"wtimeout" : 0
},
"replicaSetId" : ObjectId("5e736baa5c51ff3e198dd880")
}
}
The writeConcernMajorityJournalDefault option IS set to false!
Thanks in advance!