saurabhd336 opened a new pull request, #10893: URL: https://github.com/apache/pinot/pull/10893
When controller asks an instance to discard the segment during `/segmentConsumed` call, the offset returned is default (-1) (https://github.com/apache/pinot/blob/master/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/SegmentCompletionManager.java#L692) But, this offset is parsed regardless of the status in the LLRealtimeSegmentDataManager [https://github.com/apache/pinot/blob/master/pinot-core/src/main/java/org/apache/pi[…]ot/core/data/manager/realtime/LLRealtimeSegmentDataManager.java](https://github.com/apache/pinot/blob/master/pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManager.java#L690) which in case of DISCARD always fails with ``` 2023/06/09 11:53:54.895 ERROR [LLRealtimeSegmentDataManager_TABLE_NAME__70__1684__20230609T0553Z] [TABLE_NAME__70__1684__20230609T0553Z] Exception while in work java.lang.IllegalStateException: Caught exception when creating KinesisPartitionGroupOffset from offsetStr: -1 at org.apache.pinot.plugin.stream.kinesis.KinesisMsgOffsetFactory.create(KinesisMsgOffsetFactory.java:41) at org.apache.pinot.core.data.manager.realtime.LLRealtimeSegmentDataManager.extractOffset(LLRealtimeSegmentDataManager.java:783) at org.apache.pinot.core.data.manager.realtime.LLRealtimeSegmentDataManager$PartitionConsumer.run(LLRealtimeSegmentDataManager.java:670) at java.lang.Thread.run(Thread.java:829) [?:?] ``` This leads to the consuming segment going in an error state and getting committed prematurely with reason = Exception. This PR fixes this -- 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]
