smengcl opened a new pull request, #11007:
URL: https://github.com/apache/ozone/pull/11007
Generated-by: Claude Code (Opus 4.8)
## What changes were proposed in this pull request?
`TestOzoneClientRetriesOnExceptions.testMaxRetriesByOzoneClient` is
intermittently failing in the (gating) `integration (client)` check with:
```
[ERROR] testMaxRetriesByOzoneClient ... <<< ERROR!
java.io.IOException: Failed to execute command cmdType: CreateContainer
containerID: 1 ... createContainer { state: OPEN }
at
org.apache.hadoop.hdds.scm.XceiverClientSpi.sendCommand(XceiverClientSpi.java:131)
at
...TestOzoneClientRetriesOnExceptions.testMaxRetriesByOzoneClient(TestOzoneClientRetriesOnExceptions.java:206)
```
with the datanode reporting `CONTAINER_ALREADY_EXISTS`.
The test writes a key spanning `MAX_RETRIES + 1` block entries, expects each
entry on a distinct container, and issues a `CreateContainer` per entry so the
write can be retried across N+1 different blocks. It guards the
distinct-container premise, but that guard had become a no-op:
```java
assertThat(containerList.contains(containerID)); // AssertJ boolean assert
with no terminal: checks nothing
```
An `assertThat(boolean)` without a terminal such as `isFalse()` asserts
nothing, so when block allocation reuses a container the loop proceeds to
`CreateContainer` on an already created container, which fails with
`CONTAINER_ALREADY_EXISTS`. The line was changed from
`Assumptions.assumeFalse(containerList.contains(containerID))` to this no-op
form in HDDS-11020 (which also introduced `RoundRobinPipelineChoosePolicy`,
making container reuse more likely).
This restores the assumption so the inconclusive case (a repeated container)
is skipped instead of failing, consistent with the sibling
`Assumptions.assumeTrue(containerList.size() > MAX_RETRIES, ...)` guard a few
lines below that HDDS-11020 left intact.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-16165
## How was this patch tested?
Ran `TestOzoneClientRetriesOnExceptions#testMaxRetriesByOzoneClient`
locally: `Tests run: 1, Failures: 0, Errors: 0`. `checkstyle` on the
`ozone-integration-test` module passes. The change is a one-line revert of the
guard to its pre-HDDS-11020 form; a single green run exercises the common
(distinct-container) path, and the restored assumption converts the
intermittent repeated-container case from a hard `CONTAINER_ALREADY_EXISTS`
failure into a skipped (aborted) run, which is the original intended behavior.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]