We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
You can continue the conversation there. Go to discussion →
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
线上遇到这样的问题, 海外的云mongo出现网络波动时,主从就切换了,但是服务器连接mongo认为是一直正常就没有触发重连机制,导致更新数据时用之前的主节点(网络波动后变成从节点)进行更新,就一直报非主节点,无法更新, 这种问题有什么好的解决办法
The text was updated successfully, but these errors were encountered:
现在 4.2+ 版本的mongo,如果发生主从切换,是存在不会断联的问题。
这个问题在现在的版本还没有解决,作为解决方案之一,可以在发生主从之后,把旧的主库重启下解决。
Sorry, something went wrong.
写一个心跳调用mongo的isMaster接口,返回false就主动断开重连
No branches or pull requests
线上遇到这样的问题, 海外的云mongo出现网络波动时,主从就切换了,但是服务器连接mongo认为是一直正常就没有触发重连机制,导致更新数据时用之前的主节点(网络波动后变成从节点)进行更新,就一直报非主节点,无法更新, 这种问题有什么好的解决办法
The text was updated successfully, but these errors were encountered: