chia7712 commented on code in PR #16873:
URL: https://github.com/apache/kafka/pull/16873#discussion_r1720953484
##########
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:
Personally, I love this strict check to avoid "undefined" behavior. However,
I also try to raise "possible" objection.
**Should we view "negative timestamp" as user-defined data?**
I had saw users who using the negative timestamp (yes, we don't disable that
in protocol) in their data. That means the "negative timestamp" could be either
user-defined data or flag. Hence, those new flag (and version check) can break
the behavior that tries to find the offset of user-defined negative timestamp.
We can fix it by adding a new field `timestampType` to `LIST_OFFSET` request.
The new field can be used to indicate the "type" of timestamp.
--
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]