我们有一个来自阿里云的 MongoDB 副本集。我们将 MongoDB URL 设置为
mongodb://username:password@dds-xxxxx-pub.mongodb.rds.aliyuncs.com:3717,dds-xxxxx-pub.mongodb.rds.aliyuncs.com:3717/admin?replicaSet=mgset-xxxxx
当服务器启动时,ReactiveMongo 抛出错误:
Invalid node status Primary for dds-2zedbafbdcdae6541787-pub.mongodb.rds.aliyuncs.com:3717 (expected: Unknown); Fallback to Unknown status
我查看了 ReactiveMongo 的源代码,但不明白为什么它处于预期unknown
状态?
upSet.updateAll { n =>
if (node.names.contains(n.name) && // the node itself
n.status != node.status) {
// invalidate node status on status conflict
warn(s"Invalid node status ${node.status} for ${node.name} (expected: ${n.status}); Fallback to Unknown status")
n._copy(status = NodeStatus.Unknown)
} else n
}