AmatyaAvadhanula commented on code in PR #16162:
URL: https://github.com/apache/druid/pull/16162#discussion_r1577565952


##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorManager.java:
##########
@@ -310,14 +310,14 @@ public boolean checkPointDataSourceMetadata(
    */
   public boolean registerNewVersionOfPendingSegmentOnSupervisor(
       String supervisorId,
-      SegmentIdWithShardSpec basePendingSegment,
-      SegmentIdWithShardSpec newSegmentVersion
+      PendingSegmentRecord upgradedPendingSegment
   )
   {
     try {
       Preconditions.checkNotNull(supervisorId, "supervisorId cannot be null");
-      Preconditions.checkNotNull(basePendingSegment, "rootPendingSegment 
cannot be null");
-      Preconditions.checkNotNull(newSegmentVersion, "newSegmentVersion cannot 
be null");
+      Preconditions.checkNotNull(upgradedPendingSegment, "upgraded pending 
segment cannot be null");
+      Preconditions.checkNotNull(upgradedPendingSegment.getTaskAllocatorId(), 
"replica group cannot be null");
+      
Preconditions.checkNotNull(upgradedPendingSegment.getUpgradedFromSegmentId(), 
"root id cannot be null");

Review Comment:
   Done



##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorManager.java:
##########
@@ -326,12 +326,12 @@ public boolean 
registerNewVersionOfPendingSegmentOnSupervisor(
       }
 
       SeekableStreamSupervisor<?, ?, ?> seekableStreamSupervisor = 
(SeekableStreamSupervisor<?, ?, ?>) supervisor.lhs;
-      
seekableStreamSupervisor.registerNewVersionOfPendingSegment(basePendingSegment, 
newSegmentVersion);
+      
seekableStreamSupervisor.registerNewVersionOfPendingSegment(upgradedPendingSegment);
       return true;
     }
     catch (Exception e) {
-      log.error(e, "PendingSegmentRecord[%s] mapping update request to 
version[%s] on Supervisor[%s] failed",
-                basePendingSegment.asSegmentId(), 
newSegmentVersion.getVersion(), supervisorId);
+      log.error(e, "PendingSegment[%s] mapping update request to version[%s] 
on Supervisor[%s] failed",
+                upgradedPendingSegment.getUpgradedFromSegmentId(), 
upgradedPendingSegment.getId().getVersion(), supervisorId);

Review Comment:
   Done



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