[ 
https://issues.apache.org/jira/browse/CASSANDRA-15958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17183614#comment-17183614
 ] 

Yifan Cai commented on CASSANDRA-15958:
---------------------------------------

Hi Adam, thanks for the analysis! 
I agree with the cause, and I can reproduce the timeout exception (at closing) 
by inserting a pause between those 2 close call sites. 

The patch looks good to me. The {{closeFuture}} is updated/read within the 
synchronized block.

Only one thing to bring up is that there is a slight side effect introduced. 
With the patch, only the {{Consumer<? super ExecutorService> 
shutdownExecutors}} in the first call site will be registered. The other call 
sites, if supplying a different consumer, are all ignored. Maybe update the 
method docs for such behavior. 

> org.apache.cassandra.net.ConnectionTest testMessagePurging
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-15958
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15958
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Test/unit
>            Reporter: David Capwell
>            Assignee: Adam Holmberg
>            Priority: Normal
>             Fix For: 4.0-beta
>
>
> Build: 
> https://ci-cassandra.apache.org/job/Cassandra-trunk-test/196/testReport/junit/org.apache.cassandra.net/ConnectionTest/testMessagePurging/
> Build: 
> https://ci-cassandra.apache.org/job/Cassandra-trunk-test/194/testReport/junit/org.apache.cassandra.net/ConnectionTest/testMessagePurging/
> java.util.concurrent.TimeoutException
>       at org.apache.cassandra.net.AsyncPromise.get(AsyncPromise.java:258)
>       at org.apache.cassandra.net.FutureDelegate.get(FutureDelegate.java:143)
>       at 
> org.apache.cassandra.net.ConnectionTest.doTestManual(ConnectionTest.java:268)
>       at 
> org.apache.cassandra.net.ConnectionTest.testManual(ConnectionTest.java:236)
>       at 
> org.apache.cassandra.net.ConnectionTest.testMessagePurging(ConnectionTest.java:679)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to