Skip to content

HDDS-15996. Flaky TestClientRetryTimeout throws NPE - #10898

Merged
adoroszlai merged 1 commit into
apache:masterfrom
dombizita:HDDS-15996
Jul 31, 2026
Merged

HDDS-15996. Flaky TestClientRetryTimeout throws NPE#10898
adoroszlai merged 1 commit into
apache:masterfrom
dombizita:HDDS-15996

Conversation

@dombizita

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

TestClientRetryTimeout is an ordered, per-class suite where each test retrieves the pipeline of a freshly created key. It did it by casting the first stream entry to RatisBlockOutputStream and reading the pipeline off its XceiverClientRatis. This assumes that entry holds a live XceiverClient, but because earlier tests restart datanodes, the key's client may not be initialized yet, so the access throws an NPE. The NPE also skips key.close(), causing a secondary Found 2 leaked objects failure.

In this change the pipeline is retrieved via keyOutputStream.getLocationInfoList().get(0).getPipeline() and adds an @AfterEach that closes the key properly.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-15996

How was this patch tested?

Flaky failures without the fix: org.apache.hadoop.ozone.client.rpc.TestClientRetryTimeout#ALL[master]-10x50-java25
All green with the fix: org.apache.hadoop.ozone.client.rpc.TestClientRetryTimeout#ALL[HDDS-15996]-10x50-java25

Generated with Clause Opus 4.8

@dombizita
dombizita requested review from adoroszlai and errose28 July 29, 2026 15:15

@adoroszlai adoroszlai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dombizita for the patch.

@adoroszlai
adoroszlai merged commit 52980fe into apache:master Jul 31, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants