79 UnknownReplWriteConcern: Unknown replica set write concern
MongoDBWhat 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.
More from this engine
- 85 IndexOptionsConflictIndex already exists with different options / different name
- 67 CannotCreateIndexCannot create index
- 27 IndexNotFoundIndex not found
- 10107 NotWritablePrimarynot master / not writable primary
- 91 ShutdownInProgressThe server is in the process of shutting down
- 189 PrimarySteppedDownPrimary stepped down while operation was in progress
- 24 LockTimeoutOperation exceeded time limit waiting for a lock