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

   ### Describe the issue this Pull Request addresses
   
   This PR updates `DefaultHoodieRecordPayload` to avoid rewriting records when 
the incoming payload should not win the merge based on ordering semantics. 
Instead of returning the current persisted record, it can return a sentinel 
no-op result so the existing record is preserved without an unnecessary 
rewrite. The change also makes equal-ordering behavior configurable.
   
   ### Summary and Changelog
   
   Changes:
   - return `SENTINEL` from `combineAndGetUpdateValue()` when the incoming 
record should not update the persisted record
   - add `canProduceSentinel()` support in `DefaultHoodieRecordPayload`
   - add `hoodie.payload.update.on.same.ordering.field` config with default 
`true`
   - add tests covering equal-ordering, older incoming record, newer incoming 
record, and default behavior
   
   ### Impact
   
   Changes merge behavior for `DefaultHoodieRecordPayload` when the incoming 
record should be ignored. This can reduce unnecessary rewrites and preserve the 
existing persisted record as-is. Also introduces a new payload config for 
equal-ordering handling.
   
   ### Risk Level
   
   medium
   
   This changes merge semantics for the default payload by introducing 
sentinel-based no-op behavior. Verification was done with targeted unit tests 
for `TestDefaultHoodieRecordPayload`, including older, newer, equal-ordering, 
and default-config cases.
   
   ### Documentation Update
   
   Config documentation should be updated for 
`hoodie.payload.update.on.same.ordering.field`.
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to