anshul98ks123 opened a new pull request, #20447:
URL: https://github.com/apache/pinot/pull/20447
## Problem
When a realtime row fails to decode and `stopOnDecodeError` is off, the
consumer drops it and moves on. `RealtimeSegmentDataManager` logs the offset of
only the first such row per consuming segment ("First decode error encountered
at offset: X. Subsequent errors will be silently dropped.").
`StreamDataDecoderImpl` logs every failure, but without an offset or partition.
In one production incident only 23% of about 7k dropped rows had an offset in
the logs, so the rows to re-ingest had to be inferred from segment boundaries.
`StatelessRealtimeSegmentWriter` logs every drop, but with `_currentOffset`,
the offset the batch was fetched from, so every drop after a batch's first row
shows the wrong offset.
## Change
| File | Change |
|---|---|
| `RealtimeSegmentDataManager` | Every row dropped at decode is logged at
ERROR with its offset and stream partition. The stack trace stays on the first
drop in the segment only, to bound log volume. Metrics, `stopOnDecodeError` and
the retriable-decode path are unchanged. |
| `StatelessRealtimeSegmentWriter` | Logs the dropped row's own offset
(`metadata.getOffset()`) and the partition, still at WARN. |
Sample:
```
Dropped the message at offset: 203 of partition: 0 that failed to decode:
org.apache.kafka.common.errors.SerializationException: Error retrieving Avro
value schema for id 400
```
## Testing
- New
`RealtimeSegmentDataManagerTest#testEveryRowDroppedAtDecodeIsLoggedWithItsOffsetAndPartition`:
three drops across two batches, each logged with its own offset and partition,
stack only on the first. Class: 73/73.
- `StatelessRealtimeSegmentWriterTest`: 18/18.
--
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]