You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/12/16 01:27:55 UTC

[GitHub] [pinot] Jackie-Jiang commented on a change in pull request #7909: put addSegmentError to where stacktrace is available

Jackie-Jiang commented on a change in pull request #7909:
URL: https://github.com/apache/pinot/pull/7909#discussion_r770158408



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManager.java
##########
@@ -744,6 +742,9 @@ protected void buildSegmentForCommit(long buildTimeLeaseMs) {
       }
       _leaseExtender.addSegment(_segmentNameStr, buildTimeLeaseMs, _currentOffset);
       _segmentBuildDescriptor = buildSegmentInternal(true);
+    } catch (Exception e) {

Review comment:
       (major) I don't think we should catch the exception here. The exception should be thrown out

##########
File path: pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManager.java
##########
@@ -936,7 +929,13 @@ protected boolean commitSegment(String controllerVipUrl, boolean isSplitCommit)
   }
 
   protected boolean buildSegmentAndReplace() {
-    SegmentBuildDescriptor descriptor = buildSegmentInternal(false);
+    SegmentBuildDescriptor descriptor = null;
+    try {
+      descriptor = buildSegmentInternal(false);
+    } catch (Exception e) {
+      _realtimeTableDataManager.addSegmentError(_segmentNameStr,
+          new SegmentErrorInfo(System.currentTimeMillis(), "Could not build segment", e));
+    }
     if (descriptor == null) {
       return false;
     }

Review comment:
       Can be simplified
   ```suggestion
       try {
         buildSegmentInternal(false);
       } catch (Exception e) {
         _realtimeTableDataManager.addSegmentError(_segmentNameStr,
             new SegmentErrorInfo(System.currentTimeMillis(), "Could not build segment", e));
         return false;
       }
   ```




-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org