smengcl opened a new pull request, #11661:
URL: https://github.com/apache/ozone/pull/11661

   Generated-by: Claude Code (Opus 5.5)
   
   ## What changes were proposed in this pull request?
   
   `TestFinalizeBlock#testFinalizeBlock` intermittently fails while writing its 
first key: `Unable to allocate a container ... Pipeline ... is not ready in 
1000 ms`.
   
   `setup` only waits for SCM to report an OPEN RATIS/ONE pipeline. SCM opens 
it when the datanode reports the new Ratis group, about a second before the 
group leader is ready. When the first write lands in that window, the leader 
rejects WriteChunk with `LeaderNotReadyException` but accepts the following 
PutBlock once it becomes ready. Applying PutBlock without its chunk fails with 
"Chunk file not found", so the container is marked UNHEALTHY and the pipeline 
is closed. The client then moves to a new block, and allocation fails because 
the new pipeline is not ready yet.
   
   This patch makes `setup` wait until the datanode's Ratis division for the 
pipeline reports `isLeaderReady()` before the first write. That is the same 
check the leader uses to return `LeaderNotReadyException`.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-17213
   
   ## How was this patch tested?
   
   - `mvn -o -pl :ozone-integration-test -am test -Dtest=TestFinalizeBlock`: 
passed 2/2 locally.
   - Checkstyle passed locally.
   - The wait is on the exact condition the leader uses to reject requests, so 
the first write can no longer reach a leader that is not ready. One green run 
does not prove that by itself.
   - 10x10 
[flaky-test-check](https://github.com/smengcl/hadoop-ozone/actions/runs/39555418770)
 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: [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]

Reply via email to