Akanksha-kedia commented on code in PR #17071:
URL: https://github.com/apache/pinot/pull/17071#discussion_r2471712118


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java:
##########
@@ -627,13 +631,22 @@ private boolean processStreamEvents(MessageBatch 
messageBatch, long idlePipeSlee
       StreamPartitionMsgOffset nextOffset = metadata.getNextOffset();
       int rowSizeInBytes = metadata.getRecordSerializedSize();
       if (decodedRow.getException() != null) {
-        // TODO: based on a config, decide whether the record should be 
silently dropped or stop further consumption on
-        // decode error
-        realtimeRowsDroppedMeter =
-            _serverMetrics.addMeteredTableValue(_clientId, 
ServerMeter.INVALID_REALTIME_ROWS_DROPPED, 1,
-                realtimeRowsDroppedMeter);
-        _numRowsErrored++;
-        _numBytesDropped += rowSizeInBytes;
+        boolean stopOnDecodeError = _streamConfig.getStreamConfigsMap()
+            .getOrDefault("stopOnDecodeError", 
"false").equalsIgnoreCase("true");
+        if (stopOnDecodeError) {
+          String errorMessage = "Stopping consumption due to decode error at 
offset: " + offset;
+          _segmentLogger.error(errorMessage, decodedRow.getException());

Review Comment:
   logger.error(String message, Throwable throwable), it should automatically 
log the full stack trace.



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

Reply via email to