[
https://issues.apache.org/jira/browse/HDFS-17957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18102005#comment-18102005
]
ASF GitHub Bot commented on HDFS-17957:
---------------------------------------
joseluisll commented on PR #8659:
URL: https://github.com/apache/hadoop/pull/8659#issuecomment-5189673645
It is almost finished. I left in draft because I would like to give it a
second review before putting it as ready and get back to you.🏗
> Cleanup of leaked mini-cluster instances in tests
> -------------------------------------------------
>
> Key: HDFS-17957
> URL: https://issues.apache.org/jira/browse/HDFS-17957
> Project: Hadoop HDFS
> Issue Type: Test
> Components: test
> Reporter: Jose Luis LĂłpez
> Priority: Minor
> Labels: pull-request-available
> Original Estimate: 8m
> Remaining Estimate: 8m
>
> While analyzing HDFS-17951, I found that many tests leak mini-cluster
> instances (MiniDFSCluster, MiniQJMHACluster, MiniJournalCluster,
> MiniRouterDFSCluster, MiniYARNCluster, MiniMRYarnCluster and variants).
>  A static scan of the test sources — vetted by hand to remove false positives
> such as clusters owned by harnesses or torn down through wrapper objects —
> found 86 cases in ~60 files, in three categories:
> Â A) 27 tests create a local cluster and never shut it down on any path.
> Â B) 38 tests shut the cluster down only on the happy path (no finally /Â Â
> try-with-resources), so the cluster leaks exactly when the test fails.
> Â C) 21 classes hold a cluster in a field with no teardown in the class orÂ
> its superclasses.
> Impact: leaks stay within the class, but a leaked cluster keeps CI resourcesÂ
> under the remaining tests, and one failure can cascade into bogus failures of
> later tests in the class.
> Â
> There is no impact on production, only improvement for CI testing.Â
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]