yihua opened a new pull request, #19434:
URL: https://github.com/apache/hudi/pull/19434

   ### Describe the issue this Pull Request addresses
   
   `testReattemptOfFailedClusteringCommit` (both the Java 
`TestJavaHoodieBackedMetadata` and Spark `TestHoodieBackedMetadata` variants) 
claims to simulate a clustering that succeeded in the metadata table but failed 
before committing to the data table. It previously simulated this by completing 
the clustering, running an ingestion write plus metadata validation (which 
reads the metadata table while the clustering instant is committed), and only 
then deleting the completed replacecommit. That sequencing exercises a 
completed-then-unwound flow that normal operation never produces, and the 
intermediate read populates the JVM-global HFile block cache with a block that 
the re-attempt later rewrites at the same path, causing intermittent failures 
in the Java variant. See issue: #19429 for the broader context.
   
   ### Summary and Changelog
   
   Makes both test variants match their stated crash scenario:
   
   - Delete the completed replacecommit immediately after the clustering, 
before any subsequent metadata-table read, so no reader ever sees the first 
attempt's instant as committed.
   - Switch the clustering client to LAZY failed-writes cleaning so no 
failed-writes rollback is triggered on the pending clustering before the 
re-attempt.
   - Assert the preconditions after the deletion (clustering pending on the 
data timeline, deltacommit completed in the metadata table) and re-assert them 
after the intermediate ingestion write.
   - Use the `ignoreFilesWithCommit` variant of `validateMetadata` for the 
intermediate validation, since the first attempt's files are on storage but 
uncommitted at that point.
   
   ### Impact
   
   Test-only change; no production code affected.
   
   ### Risk Level
   
   none
   
   ### Documentation Update
   
   none
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Enough context is provided in the sections above
   - [ ] Adequate tests were added if applicable
   


-- 
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]

Reply via email to