You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "muralibasani (via GitHub)" <gi...@apache.org> on 2026/09/27 09:26:56 UTC
[PR] KAFKA-21158: Document/warn about future timestamps allowed by message.timestamp.after.max.ms [kafka]
muralibasani opened a new pull request, #23596:
URL: https://github.com/apache/kafka/pull/23596
Ref : https://issues.apache.org/jira/browse/KAFKA-21158
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-21158: Document/warn about future timestamps allowed by message.timestamp.after.max.ms [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #23596:
URL: https://github.com/apache/kafka/pull/23596#discussion_r4191240002
##########
storage/src/main/java/org/apache/kafka/storage/internals/log/LogConfig.java:
##########
@@ -529,6 +529,50 @@ public static void validateBrokerLogConfigValues(Map<String, ?> props,
}
}
+ /**
+ * Returns a warning if log.message.timestamp.after.max.ms is above the default and applies (i.e. not LogAppendTime).
+ */
+ public static Optional<String> brokerMessageTimestampAfterMaxMsWarning(long afterMaxMs, TimestampType timestampType) {
+ return messageTimestampAfterMaxMsWarning(
+ ServerLogConfigs.LOG_MESSAGE_TIMESTAMP_AFTER_MAX_MS_CONFIG + " is set to " + afterMaxMs, afterMaxMs, timestampType);
+ }
+
+ /**
+ * Topic-level variant; only warns when the override or the effective timestamp type is new or changed,
+ * so unrelated alters don't repeat it.
+ */
+ public static Optional<String> topicMessageTimestampAfterMaxMsWarning(String topic,
Review Comment:
I'm not convinced users benefit from this warning. The broker can't tell whether the raised value is intentional, so the log line would mostly be noise for users who deliberately set it and whose record timestamps are otherwise "normal". The doc update alone already explains the retention impact. Could we keep this change to the docs?
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-21158: Document/warn about future timestamps allowed by message.timestamp.after.max.ms [kafka]
Posted by "muralibasani (via GitHub)" <gi...@apache.org>.
muralibasani commented on code in PR #23596:
URL: https://github.com/apache/kafka/pull/23596#discussion_r4114957654
##########
core/src/main/scala/kafka/server/ControllerConfigurationValidator.scala:
##########
@@ -43,7 +44,7 @@ import scala.collection.mutable
* in the same RPC, BROKER_LOGGER is not really a dynamic configuration in the same sense
* as the others. It is not persisted to the metadata log.
*/
-class ControllerConfigurationValidator(kafkaConfig: KafkaConfig) extends ConfigurationValidator {
+class ControllerConfigurationValidator(kafkaConfig: KafkaConfig) extends ConfigurationValidator with Logging {
Review Comment:
If we avoid this, we need to move it to broker only
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-21158: Document/warn about future timestamps allowed by message.timestamp.after.max.ms [kafka]
Posted by "muralibasani (via GitHub)" <gi...@apache.org>.
muralibasani commented on code in PR #23596:
URL: https://github.com/apache/kafka/pull/23596#discussion_r4114957654
##########
core/src/main/scala/kafka/server/ControllerConfigurationValidator.scala:
##########
@@ -43,7 +44,7 @@ import scala.collection.mutable
* in the same RPC, BROKER_LOGGER is not really a dynamic configuration in the same sense
* as the others. It is not persisted to the metadata log.
*/
-class ControllerConfigurationValidator(kafkaConfig: KafkaConfig) extends ConfigurationValidator {
+class ControllerConfigurationValidator(kafkaConfig: KafkaConfig) extends ConfigurationValidator with Logging {
Review Comment:
If we avoid this, we need to move it to broker only
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-21158: Document/warn about future timestamps allowed by message.timestamp.after.max.ms [kafka]
Posted by "muralibasani (via GitHub)" <gi...@apache.org>.
muralibasani commented on code in PR #23596:
URL: https://github.com/apache/kafka/pull/23596#discussion_r4115033568
##########
checkstyle/import-control-storage.xml:
##########
@@ -102,6 +102,7 @@
<allow pkg="org.apache.kafka.test" />
<allow pkg="com.github.benmanes.caffeine.cache" />
<allow pkg="org.apache.kafka.coordinator.transaction"/>
+ <allow class="org.apache.logging.log4j.Level" />
Review Comment:
Needed by LogManagerTest
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-21158: Document retention impact of future timestamps allowed by message.timestamp.after.max.ms [kafka]
Posted by "m1a2st (via GitHub)" <gi...@apache.org>.
m1a2st merged PR #23596:
URL: https://github.com/apache/kafka/pull/23596
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-21158: Document retention impact of future timestamps allowed by message.timestamp.after.max.ms [kafka]
Posted by "muralibasani (via GitHub)" <gi...@apache.org>.
muralibasani commented on code in PR #23596:
URL: https://github.com/apache/kafka/pull/23596#discussion_r4199175065
##########
storage/src/main/java/org/apache/kafka/storage/internals/log/LogConfig.java:
##########
@@ -529,6 +529,50 @@ public static void validateBrokerLogConfigValues(Map<String, ?> props,
}
}
+ /**
+ * Returns a warning if log.message.timestamp.after.max.ms is above the default and applies (i.e. not LogAppendTime).
+ */
+ public static Optional<String> brokerMessageTimestampAfterMaxMsWarning(long afterMaxMs, TimestampType timestampType) {
+ return messageTimestampAfterMaxMsWarning(
+ ServerLogConfigs.LOG_MESSAGE_TIMESTAMP_AFTER_MAX_MS_CONFIG + " is set to " + afterMaxMs, afterMaxMs, timestampType);
+ }
+
+ /**
+ * Topic-level variant; only warns when the override or the effective timestamp type is new or changed,
+ * so unrelated alters don't repeat it.
+ */
+ public static Optional<String> topicMessageTimestampAfterMaxMsWarning(String topic,
Review Comment:
Thanks @chia7712 agreed.
I have removed the warning logic and kept this PR to the doc change only.
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-21158: Document retention impact of future timestamps allowed by message.timestamp.after.max.ms [kafka]
Posted by "muralibasani (via GitHub)" <gi...@apache.org>.
muralibasani commented on PR #23596:
URL: https://github.com/apache/kafka/pull/23596#issuecomment-6046415099
> Thanks, LGTM
Thank you @m1a2st
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-21158: Document/warn about future timestamps allowed by message.timestamp.after.max.ms [kafka]
Posted by "muralibasani (via GitHub)" <gi...@apache.org>.
muralibasani commented on PR #23596:
URL: https://github.com/apache/kafka/pull/23596#issuecomment-5867177523
@chia7712 @junrao pls take a look.
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org