You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "smengcl (via GitHub)" <gi...@apache.org> on 2026/10/08 06:58:15 UTC
[PR] HDDS-16781. Fix intermittent failure in TestKeyInputStream#testSkip [ozone]
smengcl opened a new pull request, #11443:
URL: https://github.com/apache/ozone/pull/11443
Generated-by: Claude Code (Opus 5.5)
## What changes were proposed in this pull request?
`TestKeyInputStream#testSkip` writes a RATIS/THREE key and reads it right away, asserting an exact ReadChunk count from `XceiverClientMetrics`. A follower may not have applied the PutBlock yet, so a ReadChunk sent to it fails with `UNKNOWN_BCSID` and the client retries on another datanode. The metric counts every attempt, so the test intermittently sees 4 ReadChunk ops instead of 2:
```
WARN keyvalue.KeyValueHandler - Operation: ReadChunk , Message: Unable to find the block with bcsID 485. Container 9 bcsId is 483. , Result: UNKNOWN_BCSID
```
The fix closes the key's container and waits until it is CLOSED on all replicas before reading (`OzoneTestHelper.waitForContainerClose`, already used by `testReadAfterReplication`). Followers apply the close only after the PutBlock (Ratis log order), so no replica can lag behind the block's bcsId.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-16781
## How was this patch tested?
- `mvn -pl :ozone-integration-test -am test -Dtest=TestKeyInputStream`: 4/4 passed locally.
- The fix removes the race by construction; a single green run cannot prove non-flakiness on its own.
- 10x10 [flaky-test-check](https://github.com/smengcl/hadoop-ozone/actions/runs/37740530899) on this branch: in progress
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-16781. Fix intermittent ReadChunk count mismatch in TestKeyInputStream [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on PR #11443:
URL: https://github.com/apache/ozone/pull/11443#issuecomment-6057656148
Thanks @adoroszlai, good idea. done
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-16781. Fix intermittent ReadChunk count mismatch in TestKeyInputStream [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on PR #11443:
URL: https://github.com/apache/ozone/pull/11443#issuecomment-6065564519
Thanks @adoroszlai for the review.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-16781. Fix intermittent ReadChunk count mismatch in TestKeyInputStream [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #11443:
URL: https://github.com/apache/ozone/pull/11443
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org