From a44e5bbffcf240cd3a857b1fb176cbaf9fd756dc Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Sat, 25 Feb 2012 09:44:36 -0700 Subject: [PATCH] Mark requests on re-pinned connections to avoid them being pconnPush()ed causing "fd_table[conn->fd].halfClosedReader != NULL" comm assertions later. Forward.cc comments imply that request->flags.pinned is set by ConnStateData but that is a lie. The flag is set by forward.cc itself. It was set for PINNED peers having a valid pinned connection only. When we retry a pinned pconn race, we still have a PINNED peer but the failed connection prevents us from setting the flag. If we successfuly re-pin later, we must set the flag. request->flags.pinned essentially means "the connection is or should be pinned". --- src/forward.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/forward.cc b/src/forward.cc index 70c1551d1a..9de8f4c3ac 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -830,6 +830,7 @@ FwdState::connectDone(const Comm::ConnectionPointer &conn, comm_err_t status, in debugs(17, 3, HERE << "repinning " << serverConn); request->clientConnectionManager->pinConnection(serverConn, request, serverConn->getPeer(), request->flags.auth); + request->flags.pinned = 1; } #if USE_SSL -- 2.47.2