qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cliff Jansen" <cliffjan...@gmail.com>
Subject Re: Review Request: Heartbeat timeout in Windows does not lead to timely reconnect
Date Mon, 26 Mar 2012 18:26:34 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated 2012-03-26 18:26:34.827957)

Review request for qpid, Andrew Stitcher, Ted Ross, Chug Rolke, and Steve Huston.


This patch follows the same logic of the previous while avoiding CancelIoEx.

CancelIo as a substitution for CancelIoEx was considered but has thread restrictions that
would have required a major rewrite of the base code.

I have substituted a much blunter instrument to achieve the completion, namely a full closesocket
to unstick the read.  It forces all pending overlapped operations to completions, which is
the last read in our case.


The cause of the hang was an outstanding read side completion when the AsynchIO object in
charge of the socket was in the queuedClose state.

The completion handler drains outstanding async requests before closing the socket.  Since
the cable had been pulled, the async read would never complete until Windows gave up on the
socket altogether (some time much later).

This patch remembers the last aio read and will cancel it  if in the queuedClose state before
blocking again.

Aside from the basic description from the Jira, I also removed an unused test for restartRead,
which doesn't change the logic of the section, but may indicate an intention that wasn't fully
coded or something left over from a previous change.

This addresses bug QPID-3759.

Diffs (updated)

  http://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp 1301636

Diff: https://reviews.apache.org/r/4383/diff


qpid-perftest, qpid-send, qpid-receive, cable pulls, broker pause/resumes



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message