[
https://issues.apache.org/jira/browse/HDDS-16131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HDDS-16131:
----------------------------------
Labels: pull-request-available (was: )
> Intermittent failure in
> TestBlockDeletingService#testBlockDeletionMetricsUpdatedProperlyAfterEachExecution
> ----------------------------------------------------------------------------------------------------------
>
> Key: HDDS-16131
> URL: https://issues.apache.org/jira/browse/HDDS-16131
> Project: Apache Ozone
> Issue Type: Sub-task
> Components: test
> Reporter: Siyao Meng
> Assignee: Chia-Chuan Ho
> Priority: Major
> Labels: pull-request-available
> Attachments: HDDS-16131.001.patch
>
>
> {code}
> [ERROR] Tests run: 72, Failures: 0, Errors: 1, Skipped: 4, Time elapsed:
> 25.55 s <<< FAILURE! -- in
> org.apache.hadoop.ozone.container.common.TestBlockDeletingService
> [ERROR]
> org.apache.hadoop.ozone.container.common.TestBlockDeletingService.testBlockDeletionMetricsUpdatedProperlyAfterEachExecution(ContainerTestVersionInfo)[5]
> -- Time elapsed: 0.686 s <<< ERROR!
> java.lang.IllegalArgumentException: refCount: [1]
> at
> com.google.common.base.Preconditions.checkArgument(Preconditions.java:206)
> at
> org.apache.hadoop.ozone.container.common.utils.ContainerCache.shutdownCache(ContainerCache.java:94)
> at
> org.apache.hadoop.ozone.container.keyvalue.helpers.BlockUtils.shutdownCache(BlockUtils.java:170)
> at
> org.apache.hadoop.ozone.container.common.TestBlockDeletingService.cleanup(TestBlockDeletingService.java:153)
> {code}
> The error is thrown from the {{@AfterEach cleanup()}}, not the test body.
> {{testBlockDeletionMetricsUpdatedProperlyAfterEachExecution}} is the only
> service-starting test in the class that never calls {{svc.shutdown()}}. The
> block-deleting run is asynchronous, so when {{deleteAndWait(svc, 3)}} returns
> the last {{BlockDeletingTask}} may still be executing and holding a container
> DB reference ({{refCount == 1}}). {{cleanup()}} then calls
> {{BlockUtils.shutdownCache()}}, whose {{ContainerCache.shutdownCache()}}
> asserts every handle has {{refCount == 0}}. Timing-dependent, so it fails
> intermittently under CI load. Adding {{svc.shutdown()}} in a {{finally}} (as
> the other tests here already do) awaits executor termination and makes
> teardown deterministic.
> Seen in:
> -
> https://github.com/adoroszlai/ozone-build-results/blob/master/2026/08/05/51982/integration-container/hadoop-hdds/container-service/org.apache.hadoop.ozone.container.common.TestBlockDeletingService.txt
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]