nsivabalan commented on code in PR #13830:
URL: https://github.com/apache/hudi/pull/13830#discussion_r2322674438
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/index/SparkMetadataTableRecordIndex.java:
##########
@@ -95,9 +96,10 @@ public <R> HoodieData<HoodieRecord<R>>
tagLocation(HoodieData<HoodieRecord<R>> r
HoodiePairData<String, HoodieRecordGlobalLocation> keyAndExistingLocations
= lookupRecords(records, context, hoodieTable, fileGroupSize);
+ boolean mayContainDuplicateLookup =
hoodieTable.getMetaClient().getTableType() == MERGE_ON_READ;
// Tag the incoming records, as inserts or updates, by joining with
existing record keys
HoodieData<HoodieRecord<R>> taggedRecords =
tagGlobalLocationBackToRecords(records, keyAndExistingLocations,
- false, shouldUpdatePartitionPath(hoodieTable), config, hoodieTable);
+ mayContainDuplicateLookup, shouldUpdatePartitionPath(hoodieTable),
config, hoodieTable);
Review Comment:
isn't this false for RLI?
in case of global bloom and global simple, just looking up records during
index tagging (before calling `tagGlobalLocationBackToRecords`, a single
incoming record key could contain multiple responses (if they happened to be in
two file groups, just that in one file group there exists a delete record in
log file which will not be accounted for in SIMPLE index, and 2nd file group is
the valid one).
but w/ RLI, we should always see just 1 response on RLI lookup before
calling `tagGlobalLocationBackToRecords`.
or am I mis-understanding something here.
--
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]