aditiwari01 opened a new issue #2756:
URL: https://github.com/apache/hudi/issues/2756


   While creating HoodieRecordPayloads from log files in case of MOR tables, 
the payloads are created without any orderingVal (even if specified while 
writing data). Due to this the precombine function could result in any payload 
irrespective of its orderingVal.
   
   Attaching a sample script to reproduce the issue.
   
   In this example, for key "key1", 1st insert is with ts=1000. Then we update 
with ts=2000. Thenn we updated with ts=500. Ideally after last update if we 
snnapshot query the table, we must get key1 with ts=2000 (since our ordering 
field is ts). However it shows entry of ts=1000 because from logs it ignores 
ts=2000 and only picks up ts=500.
   
   Also AFAIU, the same flow will be used while compaction and then we might 
lose data forever.
   
   
[Hudi_sample_commands.txt](https://github.com/apache/hudi/files/6242206/Hudi_sample_commands.txt)
   
   A workaround is to implement a HoodiePayloadClass and hardcode ordering 
field in the costructor only. But we can not keep it parameterised since 
properties are not available in the constructor.


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

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


Reply via email to