You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/08/06 04:28:18 UTC

[GitHub] [hudi] vinothchandar commented on a change in pull request #3401: [HUDI-2170] [HUDI-1763] Always choose the latest record for HoodieRecordPayload

vinothchandar commented on a change in pull request #3401:
URL: https://github.com/apache/hudi/pull/3401#discussion_r683938063



##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieMergeHandle.java
##########
@@ -239,7 +240,14 @@ protected void init(String fileId, Iterator<HoodieRecord<T>> newRecordsItr) {
         record.seal();
       }
       // NOTE: Once Records are added to map (spillable-map), DO NOT change it as they won't persist
-      keyToNewRecords.put(record.getRecordKey(), record);
+      String key = record.getRecordKey();
+      if (keyToNewRecords.containsKey(key)) {

Review comment:
       typically we won't hit this, since the precombine is done on incoming records by default, even before we index. So mostly seems like a fallback handling? 




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