You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/08/04 22:36:00 UTC
[jira] [Updated] (HDFS-17957) Cleanup of leaked mini-cluster instances in tests
[ https://issues.apache.org/jira/browse/HDFS-17957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated HDFS-17957:
----------------------------------
Labels: pull-request-available (was: )
> 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: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org