[ https://issues.apache.org/jira/browse/CASSANDRA-15170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16909454#comment-16909454 ]
Jon Meredith commented on CASSANDRA-15170: ------------------------------------------ I tracked the problem down to the StreamingInboundHandler shutdown code. I couldn't work out why it was failing the dtests, but perhaps the code being called in {{session.messageReceived}} didn't like to be thread interrupted. I've added a commit to revert the original change, and pushed up a new one that re-implements the set tracking the active handlers and switched to tracking with a weak reference as you suggested. Here's a clean(ish) [CircleCI run|https://circleci.com/workflow-run/5ed4f520-c378-4760-9e42-c000b5c1946b], {{test_simple_repair_order_preserving - repair_tests.repair_test.TestRepair}} failed, but there were flaky test comments in there too so not sure how reliable a test it is. If you're happy with the change, please can you squash the two new commits into the merge commit when you push to origin. > Reduce the time needed to release in-JVM dtest cluster resources after close > ---------------------------------------------------------------------------- > > Key: CASSANDRA-15170 > URL: https://issues.apache.org/jira/browse/CASSANDRA-15170 > Project: Cassandra > Issue Type: Improvement > Components: Test/dtest > Reporter: Jon Meredith > Assignee: Jon Meredith > Priority: Normal > > There are a few issues that slow the in-JVM dtests from reclaiming metaspace > once the cluster is closed. > IsolatedExecutor issues the shutdown on a SingleExecutorThreadPool, sometimes > this thread was still running 10s after the dtest cluster was closed. > Instead, switch to a ThreadPoolExecutor with a core pool size of 0 so that > the thread executing the class loader close executes sooner. > If an OutboundTcpConnection is waiting to connect() and the endpoint is not > answering, it has to wait for a timeout before it exits. Instead it should > check the isShutdown flag and terminate early if shutdown has been requested. > In 3.0 and above, HintsCatalog.load uses java.nio.Files.list outside of a > try-with-resources construct and leaks a file handle for the directory. This > doesn't matter for normal usage, it leaks a file handle for each dtest > Instance created. > On trunk, Netty global event executor threads are still running and delay GC > for the instance class loader. -- This message was sent by Atlassian JIRA (v7.6.14#76016) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org