Description:
We need to update the reconfig doc(https://docs.mongodb.com/master/reference/method/rs.reconfig/#availability). Currently its been mentioned as below.
"The rs.reconfig() shell method can trigger the current primary to step down in some situations. When the primary steps down, it forcibly closes all client connections."
After PM-639(Avoid closing connections and killing operations on step down), we don't close client connections on step down. And, the new behavior of step down will be addressed by DOCS-12469.
Engineering Ticket Description:
Force reconfig from the command and from a heartbeat can lead to a stepdown and thus needs to kill user operations.
Here: https://github.com/mongodb/mongo/blob/a222ef5e647ac527f7d4f8636bcacd6cc0ae6b8e/src/mongo/db/repl/replication_coordinator_impl.cpp#L2329-L2335
And here:
https://github.com/mongodb/mongo/blob/a222ef5e647ac527f7d4f8636bcacd6cc0ae6b8e/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp#L559-L568