Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve exception logging when we fail to index / transform message #12594

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

tibrewalpratik17
Copy link
Contributor

  • Adds offset value in the log when a record is failed to index / transformed. This will help in faster debugging of problematic events.

  • There was a bug where the log was not showing the value of the decodedRow but was giving the address as below:

Caught exception while transforming the record: org.apache.pinot.spi.stream.StreamDataDecoderResult@448107c6

Updated to show the decoded row value in the log.

@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 61.74%. Comparing base (59551e4) to head (a392791).
Report is 81 commits behind head on master.

Files Patch % Lines
...a/manager/realtime/RealtimeSegmentDataManager.java 25.00% 9 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #12594      +/-   ##
============================================
- Coverage     61.75%   61.74%   -0.02%     
- Complexity      207      211       +4     
============================================
  Files          2436     2451      +15     
  Lines        133233   133725     +492     
  Branches      20636    20704      +68     
============================================
+ Hits          82274    82562     +288     
- Misses        44911    45055     +144     
- Partials       6048     6108      +60     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration <0.01% <0.00%> (-0.01%) ⬇️
integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration2 0.00% <0.00%> (ø)
java-11 61.66% <25.00%> (-0.05%) ⬇️
java-21 61.62% <25.00%> (-0.01%) ⬇️
skip-bytebuffers-false 61.70% <25.00%> (-0.04%) ⬇️
skip-bytebuffers-true 61.57% <25.00%> (+33.85%) ⬆️
temurin 61.74% <25.00%> (-0.02%) ⬇️
unittests 61.73% <25.00%> (-0.02%) ⬇️
unittests1 46.92% <25.00%> (+0.03%) ⬆️
unittests2 27.68% <0.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@Jackie-Jiang Jackie-Jiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Jackie-Jiang Jackie-Jiang merged commit 61aeb6f into apache:master Mar 7, 2024
19 checks passed
Copy link
Member

@satishd satishd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tibrewalpratik17 for the PR, left a comment for the clarification.

@@ -572,6 +572,7 @@ private boolean processStreamEvents(MessageBatch messagesAndOffsets, long idlePi
// Decode message
StreamDataDecoderResult decodedRow = _streamDataDecoder.decode(messagesAndOffsets.getStreamMessage(index));
msgMetadata = messagesAndOffsets.getStreamMessage(index).getMetadata();
StreamPartitionMsgOffset messageOffset = messagesAndOffsets.getNextStreamPartitionMsgOffsetAtIndex(index);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems getNextStreamPartitionMsgOffsetAtIndex returns the offset of the next message for the given index. Should not we use getMessageOffsetAtIndex(int index) for getting the current message's offset that we wanted to use in the error messages?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @satishd for pointing this out! Created a follow-up in #12602 and also added logic for tracking filtered events there as discussed offline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants