frankvicky commented on code in PR #16873:
URL: https://github.com/apache/kafka/pull/16873#discussion_r1722606357
##########
core/src/main/scala/kafka/server/KafkaApis.scala:
##########
@@ -1170,6 +1174,8 @@ class KafkaApis(val requestChannel: RequestChannel,
debug(s"OffsetRequest with correlation id $correlationId from client
$clientId on partition $topicPartition " +
s"failed because the partition is duplicated in the request.")
buildErrorResponse(Errors.INVALID_REQUEST, partition)
+ } else if
(timestampMinSupportedVersion.contains(partition.timestamp()) && version <
timestampMinSupportedVersion(partition.timestamp())) {
Review Comment:
Hi @chia7712 and @FrankYang0529 , based on our discussion, I’ve summarized
the current handling of specific negative timestamps in Kafka. Here are the
mappings (`timestamp : version`)
• `LATEST_TIMESTAMP (-1L) : 1`
• `EARLIEST_TIMESTAMP (-2L) : 1`
• `MAX_TIMESTAMP (-3L) : 7`
• `EARLIEST_LOCAL_TIMESTAMP (-4L) : 8`
• `LATEST_TIERED_TIMESTAMP (-5L) : 9`
This should provide a clear guideline for the expected behavior across
different versions when dealing with these negative timestamps.
--
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]