chia7712 commented on code in PR #17026:
URL: https://github.com/apache/kafka/pull/17026#discussion_r1760197180


##########
core/src/main/scala/kafka/server/DelegationTokenManagerZk.scala:
##########
@@ -178,6 +178,12 @@ class DelegationTokenManagerZk(config: KafkaConfig,
 
         val issueTimeStamp = time.milliseconds
         val maxLifeTime = if (maxLifeTimeMs <= 0) tokenMaxLifetime else 
Math.min(maxLifeTimeMs, tokenMaxLifetime)
+
+        if (checkTimestampOverflow(issueTimeStamp, maxLifeTime)) {
+          responseCallback(CreateTokenResult(owner, tokenRequester, -1, -1, 
-1, "", Array[Byte](), Errors.INVALID_TIMESTAMP))

Review Comment:
   Could we set upper bound `Long.MAX_VALUE` instead of throwing exception? 
That makes `Long.MAX_VALUE` valid in request. WDYT?



-- 
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

Reply via email to