mcvsubbu commented on a change in pull request #3877: Pinot controller side 
change to enhance LLC segment metadata upload.
URL: https://github.com/apache/incubator-pinot/pull/3877#discussion_r261355945
 
 

 ##########
 File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/LLCSegmentCompletionHandlers.java
 ##########
 @@ -236,9 +251,23 @@ public String 
segmentCommit(@QueryParam(SegmentCompletionProtocol.PARAM_INSTANCE
     SegmentCompletionProtocol.Response response = 
segmentCompletionManager.segmentCommitStart(requestParams);
     if (response.equals(SegmentCompletionProtocol.RESP_COMMIT_CONTINUE)) {
       // Get the segment and put it in the right place.
-      boolean success = uploadSegment(multiPart, instanceId, segmentName, 
false) != null;
-
-      response = segmentCompletionManager.segmentCommitEnd(requestParams, 
success, false);
+      URI segmentURI = uploadSegment(multiPart, instanceId, segmentName, 
false);
+      boolean success =  (segmentURI != null);
+      SegmentMetadataImpl segmentMetadata;
+      try {
+        segmentMetadata = extractMetadataFromLocalSegmentFile(segmentName, 
segmentURI.getPath());
 
 Review comment:
   We should attempt to get metadata from the multi-part in this method as 
well. That way, we can add the server code to send multi-part form with 
metadata and everything will work. If metadata is not present in multi-part 
then we need to extract from local.
   You can add this as a separate PR before moving on to other parts, or add it 
now, your choice.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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