Mongodb has 4 nodes of replicaset with
Node 1 - Priority 1- Secondary
Node 2- Priority 1- Secondary
Node 3- Priority 1 -Primary
Node 4- Priority 0 - Secondary( used for Reading Data)
Node 3 Primary server disk was filled and running out of space and services got stopped and node 4 db services was also down due
Now here Node 1 or Node 2 Any one Node needs to became primary. But it failed to became primary
Node1 and Node2 were only Secondary , After that in the node 3 server Space was cleared and services was restarted, Node 1 became the primary and node 2 and node 3 were secondary,
My question why node 1 or node 2 didn;t became primary when the node 3 was services was down due to space constraints.
Mongodb version 5.0.20
OS
NAME=“CentOS Linux”
VERSION=“8”
ID=“centos”
ID_LIKE=“rhel fedora”
VERSION_ID=“8”
PLATFORM_ID=“platform:el8”
PRETTY_NAME=“CentOS Linux 8”
ANSI_COLOR=“0;31”
CPE_NAME=“cpe:/o:centos:centos:8”
HOME_URL=“https://centos.org/”
BUG_REPORT_URL=“https://bugs.centos.org/”
CENTOS_MANTISBT_PROJECT=“CentOS-8”
CENTOS_MANTISBT_PROJECT_VERSION=“8”
Please do suggest what can be the issue any one node should have became the primary during space issue on node 3 (Primary) services was down