adding rsockets support into JDK
Chris Hegarty
chris.hegarty at oracle.com
Tue Dec 4 20:22:47 UTC 2018
Lucy,
> On 4 Dec 2018, at 03:05, Lu, Yingqi <yingqi.lu at intel.com> wrote:
>
> Hi Brian,
>
> Thank you for the quick check. I forgot to add RdmaSocketImpl.c into the original patch file.
>
> The patch is updated at the same link: http://cr.openjdk.java.net/~ylu/8195160.23/ <http://cr.openjdk.java.net/~ylu/8195160.23/>. Please let me know if you see any issues with the updated version.
Finally, I have an environment where I can build and run the tests for
this code. I need to circle back and document this, but for now I
can successfully create an rsocket and run the java tests.
I am continuing to review the code, but here are a few comments so far:
1) BasicSocketChannelTest.java
There is a race in the test code. Sometimes the test fails with an
exception when it tries to shutdown the input/output of the client
socket/channel. The reason is that the main thread may have already
closed the socket/channel. While fixing the race I took the liberty
of refactoring the test a little. It passes successfully, reliably, now
in my environment.
https://cr.openjdk.java.net/~chegar/rsocket/webrev.23.1/
Note: I've left a TODO comment in the test. Read to EOF is not working
as I would expect ( the original version of the test did not exercise
this). I'll revisit this later.
2) Test consistency of API exception, across all platforms.
I added a test to ensure that NPE and other API exceptions are being
thrown as expected. This test can be run on all platforms, so it is
not Linux specific. I used testng, very nice for test kinda tests.
https://cr.openjdk.java.net/~chegar/rsocket/webrev.23.2/
3) Handling of null binding, automatically assigned address.
Handling of null binding is a bit tricky now that we have protocol
family support. The correct InetXAddress "any local address" needs to
be created. I added a test and a little refactoring. If you run the
test without any source changes you will be able to see the issues.
https://cr.openjdk.java.net/~chegar/rsocket/webrev.23.3/
Note: There is still an open issue, ToDo, with java.net.Socket. You
can see this by a small comment in the test. I'll revisit this later.
-Chris.
P.S. The above webrevs were created from patches in my patch queue, and
should apply cleanly to version 23 if applied in order.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20181204/e49454ff/attachment.html>
More information about the nio-dev
mailing list