sajjad-moradi commented on code in PR #8986:
URL: https://github.com/apache/pinot/pull/8986#discussion_r918204401


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/PinotLLCRealtimeSegmentManager.java:
##########
@@ -916,11 +930,15 @@ void updateIdealStateOnSegmentCompletion(String 
realtimeTableName, String commit
             "Exceeded max segment completion time for segment " + 
committingSegmentName);
       }
       
updateInstanceStatesForNewConsumingSegment(idealState.getRecord().getMapFields(),
 committingSegmentName,
-          newSegmentName, segmentAssignment, instancePartitionsMap);
+          isTablePaused(idealState) ? null : newSegmentName, 
segmentAssignment, instancePartitionsMap);

Review Comment:
   In regular cases, you're right. The new segment name in step 2 of the commit 
process will be null and here in step 3 we'll have a  null newSegmentName. In 
an edge case where pause is issued after step 2 and right before step 3, the 
new segment name is not null, but we need to pass in null to prevent creating 
new consuming segment in ideal state.



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