Copilot commented on code in PR #15563:
URL: https://github.com/apache/pinot/pull/15563#discussion_r2053894693


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/PinotLLCRealtimeSegmentManager.java:
##########
@@ -994,15 +994,17 @@ Set<Integer> getPartitionIds(StreamConfig streamConfig)
   @VisibleForTesting
   Set<Integer> getPartitionIds(List<StreamConfig> streamConfigs, IdealState 
idealState) {
     Set<Integer> partitionIds = new HashSet<>();
-    boolean allPartitionIdsFetched = true;
+    boolean allPartitionIdsFetched = false;
     for (int i = 0; i < streamConfigs.size(); i++) {
       final int index = i;
       try {
         partitionIds.addAll(getPartitionIds(streamConfigs.get(index)).stream()
             .map(partitionId -> 
IngestionConfigUtils.getPinotPartitionIdFromStreamPartitionId(partitionId, 
index))
             .collect(Collectors.toSet()));
+        allPartitionIdsFetched = true;

Review Comment:
   The variable 'allPartitionIdsFetched' is updated inside the loop but never 
used afterwards. Consider removing it to simplify the logic.
   ```suggestion
       for (int i = 0; i < streamConfigs.size(); i++) {
         final int index = i;
         try {
           
partitionIds.addAll(getPartitionIds(streamConfigs.get(index)).stream()
               .map(partitionId -> 
IngestionConfigUtils.getPinotPartitionIdFromStreamPartitionId(partitionId, 
index))
               .collect(Collectors.toSet()));
   ```



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