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

Jon Meredith commented on CASSANDRA-15170:
------------------------------------------

Thanks for the review, and apologies for the messy history. I've just pushed 
deltas to each branch this time.

Losing the Feature enum was just a misunderstanding of change history - I was 
matching trunk instead of 3.0.  Agree the enum is nicer and have implemented 
that across releases instead.

On the IsolatedExecutor shutdown executor.  When the dtests run successfully 
there isn't a problem with shutting down, it's just when there are issues with 
the instance class loaders not being released there were several cases where 
the nodeX_shutdown thread was still around and also causing a root to the 
instance class loader.  Sadly I can't reproduce it now and have lost the heap 
dump showing an example, but I know that when I was debugging it made the heap 
dump have less active threads in it which made it easier to analyze.

On to the minor items.

* For NanoTimeToCurrentTimeMillis, I've left it alone on 2.2/3.0 as trying to 
minimize change on older versions.  3.11 and above use the 
FastScheduledTaskExecutor for it.

* The ColumnFamilyStore.shutdownExecutorsAndWait uses the builder so it can add 
the perDiskflushExecutors, so I just made the code as similar as possible. 
Happy to change if you'd really like ImmutableList.of.

* The shutdown->shutdownNow change on the InfiniteLoopExecutor was just to 
match trunk naming, there's no functional change.

* We could introduce the shutdown and wait, but would mean 4 variants of it, I 
don't mind it as it is at the moment.


> 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

Reply via email to