-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
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
Improve embedded package documentation #2326
Comments
Unfortunately, starting embedded FerretDB with a But I think we could explain it better in code comments / documentation. Could you send a PR? |
收到!
|
TCP/UNIX/TLS listener's address
may cause "goroutines are asleep - deadlock"
Will pick this up. |
收到!
|
On top of what @AlekSi mentioned, mongoDB URI is formed using the listener's address and in order to get that, listener has to be instantiated which is done by Please correct me if my understanding is wrong. Thanks |
That's correct |
We should update code comments. See #2326 (comment).
Versions
0.9.3
What did you do?
I created an instance of FerretDB using the code above, but did not run
FerretDB.Run()
. Then I tried to get the MongoDB uri, which caused the program to block at<-l.tcpListenerReady
and ultimately resulted in a deadlock.What did you expect to see?
Not running FerretDB.Run() and then obtaining the MongoDB uri will not lead to a deadlock.
What did you see instead?
fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan receive]:
https://github.com/FerretDB/FerretDB/internal/clientconn.(*Listener).TCPAddr(...)
/internal/clientconn/listener.go:321
https://github.com/FerretDB/FerretDB/ferretdb.(*FerretDB).MongoDBURI(0x1057920d8?)
/ferretdb/ferretdb.go:186 +0xdc
Environment
The text was updated successfully, but these errors were encountered: