You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "vinishjail97 (via GitHub)" <gi...@apache.org> on 2026/01/14 00:11:38 UTC

[PR] Add validation for invalid HoodieWriteStat with zero counts [hudi]

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

   ### Describe the issue this Pull Request addresses
   
   Adds validation to detect and reject invalid write stats with zero operation counts, preventing inconsistent metadata from being committed.
   
   ### Summary and Changelog
   
     - Added `validateWriteStats()` method to validate write stats before finalizing writes
     - Validates that at least one of `numWrites` or `numDeletes` is non-zero
     - Throws `HoodieInconsistentMetadataException` when both counts are zero
     - Added comprehensive test coverage for validation scenarios
   
   ### Impact
   
     - Adds fail-fast validation for inconsistent write stats
     - No breaking changes - only rejects invalid operations that shouldn't succeed anyway
     - Improves error messages for easier debugging
   
   ### Risk Level
   
    **Low**
    
   New validation catches edge cases that would have caused issues downstream. No impact on valid operations.
   
   ### Documentation Update
   
   Added Javadoc explaining the validation. No other documentation changes needed.
   
   ### Contributor's checklist
   
   - [x] 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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Add validation for invalid HoodieWriteStat with zero counts [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #17863:
URL: https://github.com/apache/hudi/pull/17863#issuecomment-3747233425

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f81d8e363746c41cec7b1ba7da26fc3e248d1ad4",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11003",
       "triggerID" : "f81d8e363746c41cec7b1ba7da26fc3e248d1ad4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f81d8e363746c41cec7b1ba7da26fc3e248d1ad4 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11003) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Add validation for invalid HoodieWriteStat with zero counts [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #17863:
URL: https://github.com/apache/hudi/pull/17863#issuecomment-3747105890

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f81d8e363746c41cec7b1ba7da26fc3e248d1ad4",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f81d8e363746c41cec7b1ba7da26fc3e248d1ad4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f81d8e363746c41cec7b1ba7da26fc3e248d1ad4 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Add validation for invalid HoodieWriteStat with zero counts [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #17863:
URL: https://github.com/apache/hudi/pull/17863#issuecomment-3747111759

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f81d8e363746c41cec7b1ba7da26fc3e248d1ad4",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11003",
       "triggerID" : "f81d8e363746c41cec7b1ba7da26fc3e248d1ad4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f81d8e363746c41cec7b1ba7da26fc3e248d1ad4 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11003) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org