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

   ### Describe the issue this Pull Request addresses
   
   Closes #20116.
   
   When native log writes have no base-file instant for record positions, the 
writer still buffers one position per data or delete record and discards that 
information when generating the footer. This adds O(N) unused list entries 
before each flush.
   
   ### Summary and Changelog
   
   - Collect data and delete record positions only when 
`baseFileInstantTimeOfPositions` is present.
   - Add a data-path regression test and strengthen delete-path coverage to 
verify the position buffers are empty before flush when position metadata is 
unavailable.
   
   ### Impact
   
   Removes the unused position-buffer growth for native log writes without 
position metadata. No public API, configuration, or storage-format changes.
   
   ### Risk Level
   
   Low. The change gates collection on the existing base-file instant; 
collection and encoding remain unchanged when it is present. All 13 tests in 
`TestHoodieNativeLogFormatWriter` passed, including enabled-position, 
out-of-order, duplicate, and invalid-position cases.
   
   Validation:
   
   ```bash
   mvn -pl hudi-client/hudi-client-common -am \
     -Dtest=TestHoodieNativeLogFormatWriter \
     -Dsurefire.failIfNoSpecifiedTests=false \
     -DskipITs -DskipSparkTests -DskipScalaTests test
   ```
   
   `git diff --check` also passed.
   
   ### Documentation Update
   
   None.
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [x] Enough context is provided in the sections above
   - [x] 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