> On Jan. 28, 2016, 1:04 a.m., Udo Kohlmeyer wrote: > > The change in the TCPServer, > > ``` > > DataSerializer.writeObject(response, output); > > output.flush() > > ``` > > seems a little redundant. As the writeObject internally already flushes the > > stream. Maybe test without the flush. But it cannot hurt to have a flush() > > Bruce Schuchardt wrote: > I wonder why DataSerializer.writeObject() is flushing the stream? I > wouldn't think we'd want it to do that. > > Udo Kohlmeyer wrote: > InternalDataSerializer.writeSerializableObject() that flushes the stream. > Line: 2369. Might be corner case. But would be good to just get some > confirmation.
I don't see a problem with that method. It's legitimately flushing the ObjectOutputStream that it creates. ObjectOutputStream has a buffered stream that it writes to and only drains if the buffer is full. - Bruce ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/42883/#review116673 ----------------------------------------------------------- On Jan. 28, 2016, 12:24 a.m., Bruce Schuchardt wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/42883/ > ----------------------------------------------------------- > > (Updated Jan. 28, 2016, 12:24 a.m.) > > > Review request for geode, Hitesh Khamesra and Udo Kohlmeyer. > > > Bugs: GEODE-871 > https://issues.apache.org/jira/browse/GEODE-871 > > > Repository: geode > > > Description > ------- > > This change-set alters the client to abort its TCP/IP connection to the > locator by enabling SO_LINGER and setting the timeout to zero before it > closes the connection. The Locator closes its connection first, which puts > it into TIME_WAIT. The client then aborts the connection, which cleans up > the Locator's TIME_WAIT connection. > > > Diffs > ----- > > > gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java > 47f50b342e495a25978d86f717b6140b67687618 > > gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java > f52b9ab3a47c9dc4147a852695b789a2d11b958e > > Diff: https://reviews.apache.org/r/42883/diff/ > > > Testing > ------- > > Manual testing using TcpClient to send GetAllServersRequests to the locator > thousands of times & counting the number of sockets open on the locator > machine with "netstat -a". > > I'm not sure how this could be unit-tested. > > > Thanks, > > Bruce Schuchardt > >