Raise an error when "majority" writes not possible
This topic is related to https://www.mongodb.com/docs/v6.0/tutorial/mitigate-psa-performance-issues/ in a PSA ReplicaSet configuration.
When you try to execute a command with writeConcern {w: "majority"}
in a three-member Primary-Secondary-Arbiter configuration where one data bearing node is not available, then the command hangs forever - unless the missing member becomes available again or you reconfigure the ReplicaSet to {votes: 0, priority: 0}
on the non-available member.
Instead of waiting forever, MongoDB should rollback the change and raise an error. This behavior should apply mainly for operations where {w: "majority"}
is set implicitly and cannot be changed by the user, for example at "renameCollection" issued on 'mongos'. You may introduce a new optional parameter which controls whether the command waits forever (the current behavior) or raises an error after a given timeout.
![](https://secure.gravatar.com/avatar/d1b2da4d09566b6a9d1fcfaeb15d4acb?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)