|
In the backup and restore test infrastructure, we run a background workload against the primary node to generate data. Eventually, we add a new node to the replica set from the backed up data to verify its integrity and correctness. This triggers an election in the replica set and it's possible for a new primary to be elected. However, we continue to run the background workload during this and tests executing commands will fail:
{
|
"topologyVersion" : {
|
"processId" : ObjectId("5fc7fecfdc93d053ec7a5c62"),
|
"counter" : NumberLong(9)
|
},
|
"operationTime" : Timestamp(1606943542, 191),
|
"ok" : 0,
|
"errmsg" : "not master and slaveOk=false",
|
"code" : 13435,
|
"codeName" : "NotPrimaryNoSecondaryOk",
|
"$clusterTime" : {
|
"clusterTime" : Timestamp(1606943542, 191),
|
"signature" : {
|
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
|
"keyId" : NumberLong(0)
|
}
|
}
|
}
|
|