rohityadav1993 commented on code in PR #13107:
URL: https://github.com/apache/pinot/pull/13107#discussion_r1624938440


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/ConcurrentMapPartitionUpsertMetadataManager.java:
##########
@@ -158,6 +158,51 @@ protected void addOrReplaceSegment(ImmutableSegmentImpl 
segment, ThreadSafeMutab
     }
   }
 
+  /**
+   * <li> When the replacing segment and current segment are of {@link 
LLCSegmentName} then the PK should resolve to
+   * row in segment with higher sequence id.
+   * <li> When the replacing segment and current segment are of {@link 
UploadedRealtimeSegmentName} then the PK
+   * should resolve to row in segment with higher sequence id, creation time.
+   * <li> When either is of type {@link UploadedRealtimeSegmentName} then 
resolve on creation time, if same(rare
+   * scenario) then give preference to uploaded time
+   *

Review Comment:
   afaik, we can create segments using `SegmentIndexCreationDriverImpl` and 
creationTime is always populated. The segment name format may be unknown but 
the segment is still uploaded and can be for say, data correction/addition.
   
   So we can rely on creation time as first comparison criterion followed by 
below criteria:
   LLC, Unknown: creation time check or prefer unknown as this is an uploaded 
segment too (deviates from current behaviour)
   Uploaded, Unknown: creation time check or prefer known name format
   Unknown, Unknown: creation time check or false



-- 
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-unsubscr...@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to