Using non-native transports with SocketOptions should cause an error
Isssue #3251
- [x] You have read the contribution guidelines.
- [x] You have created a feature request first to discuss your contribution intent. Please reference the feature request ticket number in the pull request.
- [x] You applied code formatting rules using the
mvn formatter:formattarget. Don’t submit any formatting related changes. - [ ] You submit test cases (unit or integration tests) that back your changes.
This is an interesting approach, but it does not fully cover the different invariants.
The logic that outputs warnings in the log is in the ConnectionBuilder.java class.
As you can see only io_uring and epoll support TCP_USER_TIMOUT, while io_uring, epoll the extended socket options in Java 11 support TCP_KEEP_ALIVE / TCP_KEEPIDLE and TCP_KEEPINTERVAL.
I was thinking of replacing the log message with the LettuceAssert.assertState that is already used there.
What do you think?
This is an interesting approach, but it does not fully cover the different invariants.
The logic that outputs warnings in the log is in the ConnectionBuilder.java class.
As you can see only
io_uringandepollsupport TCP_USER_TIMOUT, whileio_uring,epollthe extended socket options in Java 11 support TCP_KEEP_ALIVE / TCP_KEEPIDLE and TCP_KEEPINTERVAL.I was thinking of replacing the log message with the
LettuceAssert.assertStatethat is already used there.What do you think?
I agree; this is the safer version. I don't want to break anything. Let me update.