ankitsultana commented on code in PR #16034:
URL: https://github.com/apache/pinot/pull/16034#discussion_r2138506657


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/BasePartitionUpsertMetadataManager.java:
##########
@@ -1146,4 +1148,27 @@ public Set<String> getNewlyAddedSegments() {
     }
     return Collections.emptySet();
   }
+
+  /**
+   * Returns the ZooKeeper creation time for upsert consistency.
+   * This refers to the time set by the controller when creating new consuming 
segment.
+   * This is used to ensure consistent creation time across replicas for upsert
+   * operations.
+   * @return ZK creation time in milliseconds, or Long.MIN_VALUE if not set
+   */
+  protected long getAuthoritativeCreationTime(IndexSegment segment) {
+    SegmentMetadata segmentMetadata = segment.getSegmentMetadata();
+    if (segmentMetadata.isMutableSegment()) {
+      return segmentMetadata.getIndexCreationTime();

Review Comment:
   this seems like a new change after a recent revision. What's the context?
   
   Shouldn't zk creation time be set for every mutable segment? Not sure why we 
would use index creation time 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: 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