peterxcli commented on code in PR #18096: URL: https://github.com/apache/kafka/pull/18096#discussion_r1879310504
########## core/src/main/java/kafka/server/share/SharePartition.java: ########## @@ -2125,16 +2128,25 @@ private long startOffsetDuringInitialization(long partitionDataStartOffset) thro if (partitionDataStartOffset != PartitionFactory.UNINITIALIZED_START_OFFSET) { return partitionDataStartOffset; } - GroupConfig.ShareGroupAutoOffsetReset offsetResetStrategy; + ShareGroupAutoOffsetResetStrategy offsetResetStrategy; if (groupConfigManager.groupConfig(groupId).isPresent()) { offsetResetStrategy = groupConfigManager.groupConfig(groupId).get().shareAutoOffsetReset(); } else { offsetResetStrategy = GroupConfig.defaultShareAutoOffsetReset(); } - if (offsetResetStrategy == GroupConfig.ShareGroupAutoOffsetReset.EARLIEST) + if (offsetResetStrategy.timestamp().isEmpty()) { + throw new Exception("The timestamp is not available for the share partition: " + topicIdPartition); Review Comment: I think I would change this to return NoOffsetForPartitionException: https://github.com/apache/kafka/pull/17972/files#diff-8a7549a9127f9c2eac443cfb35f0d7c1ee8e2884576badd3670a7f19460c59d2R293 -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org