i’m using mongoose
configured a replica set of 4 instances
i started inserting data into the replica set with interval 1 second
while the data is being inserted, i stepped down the primary server
after that a ‘disconnected’ event was fired and ‘reconnected’ is fired … after that the replica set has 3 servers it elects one of the 3 remaining to be the primary and the data continued to be inserted into the database
when the new primary is stepped down now i have 2 working secondaries servers in the replica set it doesn’t elect a new primary of the two secondaries to be the new primary instead of that it throws MongooseServerSelectionError
why not one of the two remaining servers is selected as primary?