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: [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]