voonhous commented on code in PR #20893:
URL: https://github.com/apache/hudi/pull/20893#discussion_r4695642674


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/deltacommit/SparkUpsertDeltaCommitPartitioner.java:
##########
@@ -101,6 +102,13 @@ private List<FileSlice> getSmallFileCandidates(String 
partitionPath, HoodieInsta
       return Collections.emptyList();
     }
 
+    // The merge that packs inserts into a small base file takes every record 
of its file group, and would take

Review Comment:
   **blocker:** The same corruption is still reachable when the index can index 
log files: inserts go through HoodieAppendHandle, which swaps in the 
partial-update schema for every record (HoodieAppendHandle.java:126-128). On a 
MOR table with a consistent-hashing bucket index (or INMEMORY), `when matched 
then update set price = s.price when not matched then insert *` with source ids 
1 and 9 reads id 9 back as `[17, <commit_seqno>, 2.2E-312]`, and the statement 
succeeds; `update set *` is correct. It predates this PR, but the Impact 
section says partial updates no longer corrupt records on MOR. Could 
`isPartialUpdateActionForMOR` also turn partial updates off when the index can 
index log files and the statement has an insert clause, next to the HUDI-9258 
global-index gate?



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