klsince commented on code in PR #13107:
URL: https://github.com/apache/pinot/pull/13107#discussion_r1625104449
##########
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:
sgtm, basically:
1. if both LLC, compare seqId
2. if both Uploaded, compare ctime, then seqId (btw, I refined this point
based on one unit test in this PR. I commented on that unit test as well.)
3. otherwise, simply check ctimes. If ctimes are same, favor uploaded segment
--
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]