We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
代码之中 好像没考虑 类似单例模式 双重检查的场景。
The text was updated successfully, but these errors were encountered:
具体是为了解决什么问题呢?
crawlab-db/mongo/client.go
Line 91 in 40c7a5c
Sorry, something went wrong.
具体是为了解决什么问题呢? crawlab-db/mongo/client.go Line 91 in 40c7a5c _clientMap[_optsKey] = c 感觉并发的时候会不安全。 在最开始获取mongodb 的客户端的时候,由于并发,会创建多个客户端,虽然map之中会存储唯一的一个,但是 其他的客户端会多余,同时多余的客户端 不会关闭,在一段时间内 会有过多的连接。
感觉并发的时候会不安全。 在最开始获取mongodb 的客户端的时候,由于并发,会创建多个客户端,虽然map之中会存储唯一的一个,但是 其他的客户端会多余,同时多余的客户端 不会关闭,在一段时间内 会有过多的连接。
是会有这个问题,但实际测试过会导致并发或者连接数爆炸么?
No branches or pull requests
代码之中 好像没考虑 类似单例模式 双重检查的场景。
The text was updated successfully, but these errors were encountered: