Siyao Meng created HDDS-16987:
---------------------------------
Summary: Intermittent failure in
TestLeaseRecovery#testGetCommittedBlockLength*
Key: HDDS-16987
URL: https://issues.apache.org/jira/browse/HDDS-16987
Project: Apache Ozone
Issue Type: Sub-task
Components: test
Reporter: Siyao Meng
Assignee: Siyao Meng
{{TestLeaseRecovery#testGetCommittedBlockLengthTimeout}} and
{{#testGetCommittedBlockLengthWithException}} fail on the first run in almost
every {{integration (flaky)}} job, and pass on the rerun. In the last 214
master runs (2026-09-20 to 2026-10-14), every job needed a rerun of
{{TestLeaseRecovery}}:
{code}
TestLeaseRecovery.testGetCommittedBlockLengthTimeout(boolean)[1]
closeIgnoringOMException:119 expected: <KEY_UNDER_LEASE_RECOVERY> but was:
<KEY_NOT_FOUND>
TestLeaseRecovery.testGetCommittedBlockLengthTimeout(boolean)[2]
testGetCommittedBlockLengthTimeout:386 expected: <3> but was: <0>
TestLeaseRecovery.testGetCommittedBlockLengthWithException
testGetCommittedBlockLengthWithException:435 expected: <2> but was: <1>
{code}
{{closeLatestContainer()}} closes the last container returned by
{{ContainerManager#getContainers}}, assuming it holds the block just written by
the test. That only holds on a fresh cluster. After earlier test methods have
run, SCM has several open containers across pipelines, and the block is often
allocated to a different one. The test then closes an unrelated pipeline, the
block's pipeline stays open, and lease recovery finalizes the block through
{{FinalizeBlock}} instead of falling back to {{GetCommittedBlockLength}}, so
the assertions on {{GetCommittedBlockLength}} fail. The rerun passes because it
starts a new cluster and runs only the failed methods.
Fix: close the container of the last block written by the test's output stream.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]