J-HowHuang commented on code in PR #18640:
URL: https://github.com/apache/pinot/pull/18640#discussion_r3335998678


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/ConcurrentMapPartitionUpsertMetadataManager.java:
##########
@@ -71,6 +71,9 @@ protected long getNumPrimaryKeys() {
   protected void doAddOrReplaceSegment(ImmutableSegmentImpl segment, 
ThreadSafeMutableRoaringBitmap validDocIds,
       @Nullable ThreadSafeMutableRoaringBitmap queryableDocIds, 
Iterator<RecordInfo> recordInfoIterator,
       @Nullable IndexSegment oldSegment, @Nullable MutableRoaringBitmap 
validDocIdsForOldSegment) {
+    if (_partialUpsertHandler != null) {
+      recordInfoIterator = resolveComparisonTies(recordInfoIterator, 
_hashFunction);
+    }

Review Comment:
   For this method `resolveComparisonTies` can we try to not construct the 
entire Map in-memory here just to get the iterator? 
   
   We have something similar in 
`BasePartitionDedupMetadataManager#addOrReplaceSegment`, and it's creating the 
iterator properly via some readers without allocating the memory all at once.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to