Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Database
Created by Guest
Created on Oct 30, 2022

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.
  • Attach files