DBAtlas · Database operations atlas

79 UnknownReplWriteConcern: Unknown replica set write concern

MongoDB

What does it mean?

The specified write concern is not recognized. The w value used in the operation (a custom/tagged write concern name or a numeric value) is not defined in the replica set configuration.

Why does it happen?

Using a custom write concern name not defined in getLastErrorModes (e.g. a typo instead of 'majority', or a custom tag name). The configuration and the request do not match. Note: requesting a numeric w above the number of voting members is a different error (100 UnsatisfiableWriteConcern).

How to fix it

Make sure the write concern name you use is defined in the replica set settings. View the current configuration: rs.conf() (settings.getLastErrorModes). If you use a custom mode, define it first, or switch to standard values ('majority' or a valid numeric w). Review the writeConcern setting in the driver/application connection string.

Open in DBAtlas →

More from this engine