chenboat commented on a change in pull request #4914: [POC] By-passing 
deep-store requirement for Realtime segment completion
URL: https://github.com/apache/incubator-pinot/pull/4914#discussion_r360610807
 
 

 ##########
 File path: 
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManager.java
 ##########
 @@ -769,12 +784,21 @@ protected boolean commitSegment(String controllerVipUrl, 
boolean isSplitCommit)
     if (!segTarFile.exists()) {
       throw new RuntimeException("Segment file does not exist:" + 
segTarFileName);
     }
+    // Set the flag to true to prevent the server delete the segment for 
upload after receiving OFFLINE->ONLINE
+    // message from helix.
+    _waitingForUploadToSegmentStore = true;
     SegmentCompletionProtocol.Response commitResponse = 
commit(controllerVipUrl, isSplitCommit);
 
     if 
(!commitResponse.getStatus().equals(SegmentCompletionProtocol.ControllerResponseStatus.COMMIT_SUCCESS))
 {
       return false;
     }
-
+    // Asynchronously upload the segment file to Pinot FS for backup. The 
upload result does not change the segment
+    // completion protocol flow.
+    if (!_indexLoadingConfig.isEnableSegmentUploadToController()) {
 
 Review comment:
   Yes. I should introduced one more flag to control the behavior. Right now my 
logic is that if server does not upload the segment to controller, it must 
upload the segment to deep storage -- which might not always be the case if 
there is no deep storage configured.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to