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 the realtime time creation unit test #6032
Conversation
91e1658
to
295371e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. While seems the validation is not related to the unit test?
@Jackie-Jiang I will rename the description and title. |
1. Added the precondition check for time interval from segment metadata 2. Added the unit test to check the case when the invalid time column name is configured in the table config
295371e
to
cb5e34e
Compare
@@ -504,6 +504,8 @@ private LLCRealtimeSegmentZKMetadata updateCommittingSegmentZKMetadata(String re | |||
committingSegmentZKMetadata.setDownloadUrl(isPeerURL(committingSegmentDescriptor.getSegmentLocation()) | |||
? CommonConstants.Segment.METADATA_URI_FOR_PEER_DOWNLOAD : committingSegmentDescriptor.getSegmentLocation()); | |||
committingSegmentZKMetadata.setCrc(Long.valueOf(segmentMetadata.getCrc())); | |||
Preconditions.checkNotNull(segmentMetadata.getTimeInterval(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consumption will stop if this condition hits. Are we sure that is what we want?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcvsubbu This condition should not happen after the fix from #5966. When this happens, the realtime segment commit would anyway fail and the consumption would be stopped due to the null pointer exception. (egmentMetadata.getTimeInterval().getStartMillis()
gets called at the following line). I'm just trying to add more information to the logs here since the log message was not informative when we hit that.
We recently saw the null pointer error issue (and the consumption actually stopped) when the time column is misconfigured.
2020/09/17 20:36:52.666 ERROR [SegmentCompletionFSM_XXXXX__3__0__20200915T2142Z] [grizzly-http-server-3] [pinot-controller] [] Caught exception while committing segment metadata for segment: XXXXX__3__0__20200915T2142Z
java.lang.NullPointerException: null
is configured in the table config