kfaraz commented on code in PR #19059:
URL: https://github.com/apache/druid/pull/19059#discussion_r2907247642


##########
server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java:
##########
@@ -1959,9 +1972,35 @@ private Set<DataSegmentPlus> 
createNewIdsOfAppendSegmentsAfterReplace(
               oldSegmentMetadata.getIndexingStateFingerprint()
           )
       );
+      segmentsToInsert.add(dataSegment);
     }
 
-    return upgradedSegments;
+    return segmentsToInsert.stream().map(segment -> {
+      // update corePartitions in shard spec
+      Integer partitionNum = 
intervalToCurrentPartitionNum.get(segment.getInterval());
+      if (!segment.isTombstone() && 
!numChunkNotSupported.contains(segment.getInterval()) && partitionNum != null) {
+        return 
segment.withShardSpec(segment.getShardSpec().withCorePartitions(partitionNum + 
1));

Review Comment:
   I see, thanks for the clarification! I must have missed that in the diff.



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