-
-
Notifications
You must be signed in to change notification settings - Fork 137
DomainSocket support #285
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
DomainSocket support #285
Conversation
# Conflicts: # db-async-common/src/main/java/com/github/jasync/sql/db/Configuration.kt # db-async-common/src/main/java/com/github/jasync/sql/db/util/NettyUtils.kt
…, usage of EpollEventLoopGroup will cause UnsatisfiedLinkError
I think a reasonable approach can be to control that with system properties like "forceNioSocket" or "forceDomainSocket" that will be set by specific tests. |
import com.github.jasync.sql.db.mysql.message.server.PreparedStatementPrepareResponse | ||
import com.github.jasync.sql.db.mysql.message.server.ResultSetRowMessage | ||
import com.github.jasync.sql.db.mysql.message.server.ServerMessage | ||
import com.github.jasync.sql.db.mysql.message.client.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please refrain from using star imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My IDEA with default JetBrains code style automatic format to *, could you please provide your code style xml so i can import to my IDEA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
hi @oshai , I'm sorry, but i couldn't find the description of system properties in the netty document, cloud you please provide the documentation page about that so I can learn it. Thanks! |
I was referring java system properties: https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html |
There may be some misunderstanding, I am not asking how to read and set system properties. I want to know what "forceNioSocket" or "forceDomainSocket" does, and what documentation they are described in. Obviously, they are not java standard system properties. |
What I meant is that in |
Got it! |
@czp3009 any update on this PR? |
I'm sorry, I'm still trying to update this PR, but I've been very busy at work and haven't been able to find the time. If I have time I will add the previously missing test code to this PR immediately |
Thank you very much for your awesome work, since unix domain socket has been implemented, I will close the PR |
This PR aims to implement support for DomainSockets, using code from #176.
But the test code still has some problems. Since the project's dependencies do not include "netty-transport-native-epoll", the
Epoll
class does not exist even when test on Linux system. Thus,NettyUtils
always choseNioSocketChannel
.But adding "netty-transport-native-epoll" to the dependency will cause some tests for
NettyUtils
to fail because they are hard-coded and the test code will always determine ifNioSocketChannel
is returned.I'm confused about how to test all the code, both without the domain socket and with it. Further, in order to test domain sockets, then all test code may not work on some systems, such as Windows.