noob-se7en commented on code in PR #15062:
URL: https://github.com/apache/pinot/pull/15062#discussion_r2355302168


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/BlockingSegmentCompletionFSM.java:
##########
@@ -143,12 +144,13 @@ public 
BlockingSegmentCompletionFSM(PinotLLCRealtimeSegmentManager segmentManage
     _maxTimeAllowedToCommitMs = _startTimeMs + _initialCommitTimeMs;
     _controllerVipUrl = segmentCompletionManager.getControllerVipUrl();
 
-    if (segmentMetadata.getStatus() == 
CommonConstants.Segment.Realtime.Status.DONE) {
+    if (segmentMetadata.getStatus() != 
CommonConstants.Segment.Realtime.Status.IN_PROGRESS) {
+      _state = BlockingSegmentCompletionFSMState.COMMITTED;

Review Comment:
   This is in-correct for Pauseless right? 
   
   Also in general this code will break when lead controller changes during 
segment commit. 
   I encountered an issue where segment was in `committing` state and fsm 
_state was `COMMITTER_UPLOADING` in controller. After this change, when lead 
controller changes during segment commit, upon receiving commitEnd call, the 
fsm was created with `COMMITTED` state which is wrong.
   
   Probably we should just throw error here.
   
   @Jackie-Jiang 



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