Re: RFR: 8151299 Http client SelectorManager overwriting read and write events

2016-03-09 Thread Chris Hegarty
Michael, This is a nasty bug. I agree with the notion of the attachment tracking the interest ops. Most of my comments are related to code-style, cleanup, and closing of resources by test. Rather than trying to list them I’ve included a webrev, generated against your patch. You can just import it,

Re: RFR: 8151299 Http client SelectorManager overwriting read and write events

2016-03-09 Thread Michael McMahon
On 08/03/16 14:10, Claes Redestad wrote: On 2016-03-08 14:42, Michael McMahon wrote: Iterator-based removal would work, or building a new list to replace pending with might be more efficient. The synchronization scheme seems a bit flaky as well? The new code is always called from the sa

Re: RFR: 8151299 Http client SelectorManager overwriting read and write events

2016-03-09 Thread Michael McMahon
On 09/03/16 10:24, Michael McMahon wrote: On 08/03/16 14:10, Claes Redestad wrote: Another oddity in the surrounding code is that System.currentTimeMillis() is always called, but only used when selector.select(timeval) == 0 - could this be moved into the if-block? 266 long now = System.curr

Re: RFR: 8151299 Http client SelectorManager overwriting read and write events

2016-03-09 Thread Michael McMahon
Thanks for the review Chris. The comments all look reasonable. I agree SelectorAttachment is better being made static. - Michael On 09/03/16 10:25, Chris Hegarty wrote: Michael, This is a nasty bug. I agree with the notion of the attachment tracking the interest ops. Most of my comments are r

Re: RFR: 8151441 TEST: java/net/httpclient/RequestBodyTest.java failing

2016-03-09 Thread Chris Hegarty
On 8 Mar 2016, at 20:49, Michael McMahon wrote: > This is a small change, where an internal completion result > was getting lost. > > http://cr.openjdk.java.net/~michaelm/8151441/webrev.1/ The source changes look ok, maybe just line up the dots of the method invocations of sendBodyAsync and the