Hello Alexey Serbin, Ashwani Raina, Kudu Jenkins,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/25016

to look at the new patch set (#2).

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. 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 new TCP reset test passes
100 repetitions and fails with ENOTCONN instead of ECONNRESET without
the fix.

Change-Id: I9196b35ee15d2111379a5a504745e83c831b640b
---
M src/kudu/util/net/socket-test.cc
M src/kudu/util/net/socket.cc
2 files changed, 63 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/16/25016/2
--
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: newpatchset
Gerrit-Change-Id: I9196b35ee15d2111379a5a504745e83c831b640b
Gerrit-Change-Number: 25016
Gerrit-PatchSet: 2
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)

Reply via email to