walterddr commented on code in PR #10773:
URL: https://github.com/apache/pinot/pull/10773#discussion_r1196823821
##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManager.java:
##########
@@ -1419,8 +1419,15 @@ public LLRealtimeSegmentDataManager(SegmentZKMetadata
segmentZKMetadata, TableCo
// Create message decoder
Set<String> fieldsToRead =
IngestionUtils.getFieldsForRecordExtractor(_tableConfig.getIngestionConfig(),
_schema);
- StreamMessageDecoder streamMessageDecoder =
StreamDecoderProvider.create(_partitionLevelStreamConfig, fieldsToRead);
- _streamDataDecoder = new StreamDataDecoderImpl(streamMessageDecoder);
+ try {
+ StreamMessageDecoder streamMessageDecoder =
+ StreamDecoderProvider.create(_partitionLevelStreamConfig,
fieldsToRead);
+ _streamDataDecoder = new StreamDataDecoderImpl(streamMessageDecoder);
+ } catch (Exception e) {
+ _realtimeTableDataManager.addSegmentError(_segmentNameStr,
+ new SegmentErrorInfo(now(), "Failed to initialize the
StreamMessageDecoder", e));
Review Comment:
why do we log to the table data manager here instead of using
`_segmentLogger.error` API here?
or the other way to ask is: there are other _segmentLogger.error or thrown
error in this method, don't we also need to call
`_realtimeTableDataManager.addSegmentError` to those as well?
if the comment above make sense, should we do something similar to
`PartitionConsumer` consume loop and call the
_realtimeTableDataManager.addSegmentError at the very end as a catch all?
--
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]