79 UnknownReplWriteConcern: Unknown replica set write concern(未知的副本集写关注)
MongoDB含义
指定的写关注(write concern)无法识别。操作中使用的 w 值(自定义/标签写关注名称或数值)未在副本集配置中定义。
原因
使用了未在 getLastErrorModes 中定义的自定义写关注名称(例如把 'majority' 拼错,或自定义标签名称)。配置与请求不匹配。注意:请求的数值 w 大于有投票权成员数是另一个错误(100 UnsatisfiableWriteConcern)。
解决方法
确保所用的写关注名称已在副本集设置中定义。查看当前配置:rs.conf()(settings.getLastErrorModes)。如果使用自定义模式,先定义它,或改用标准值('majority' 或有效的数值 w)。检查驱动/应用连接字符串中的 writeConcern 设置。
同一数据库的其他条目
- 85 IndexOptionsConflictIndex already exists with different options / different name(索引已存在但选项不同/名称不同)
- 67 CannotCreateIndexCannot create index(无法创建索引)
- 27 IndexNotFoundIndex not found(未找到索引)
- 10107 NotWritablePrimarynot master / not writable primary(不是 master / 不是可写的主节点)
- 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(操作等待锁时超出时间限制)