Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/25016 )
Change subject: [net] preserve errno from failed recv() ...................................................................... [net] preserve errno from failed recv() Socket::Recv() calls GetPeerAddress() before saving errno. After a connection reset, peer lookup also fails and can replace the original ECONNRESET with ENOTCONN. Save errno before the peer lookup. Keep the fault-injection regression test and add a real TCP reset test for IPv4 and IPv6. Use SetLinger() to close the accepted socket with zero linger and verify that Recv() reports ECONNRESET with the expected error text. The EOF path still reports ESHUTDOWN. Testing: all 8 socket-test tests pass. The real TCP reset test passes 100 repetitions. Focused native build, cpplint and diff check pass. Change-Id: I9196b35ee15d2111379a5a504745e83c831b640b Reviewed-on: http://gerrit.cloudera.org:8080/25016 Reviewed-by: Ashwani Raina <[email protected]> Tested-by: Ashwani Raina <[email protected]> Reviewed-by: Alexey Serbin <[email protected]> --- M src/kudu/util/net/socket-test.cc M src/kudu/util/net/socket.cc M src/kudu/util/net/socket.h 3 files changed, 62 insertions(+), 1 deletion(-) Approvals: Ashwani Raina: Looks good to me, approved; Verified Alexey Serbin: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/25016 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9196b35ee15d2111379a5a504745e83c831b640b Gerrit-Change-Number: 25016 Gerrit-PatchSet: 4 Gerrit-Owner: Aleksandr Efimov <[email protected]> Gerrit-Reviewer: Aleksandr Efimov <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Ashwani Raina <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120)
