divijvaidya commented on code in PR #18106:
URL: https://github.com/apache/kafka/pull/18106#discussion_r1876772667
##########
core/src/test/scala/unit/kafka/tools/DumpLogSegmentsTest.scala:
##########
@@ -87,6 +87,7 @@ class DumpLogSegmentsTest {
private def createTestLog = {
val props = new Properties
props.setProperty(TopicConfig.INDEX_INTERVAL_BYTES_CONFIG, "128")
+ props.setProperty(TopicConfig.MESSAGE_TIMESTAMP_AFTER_MAX_MS_CONFIG,
Long.MaxValue.toString)
Review Comment:
could you please add a comment here on why this change was needed? Does this
test use messages with future timestamps? If yes, is it necessary? If yes, then
can we localize this config change to specifically that test?
(same for the change in other test)
##########
server-common/src/main/java/org/apache/kafka/server/config/ServerLogConfigs.java:
##########
@@ -132,16 +132,16 @@ public class ServerLogConfigs {
"If log.message.timestamp.type=CreateTime, the message will be
rejected if the difference in timestamps exceeds " +
"this specified threshold. This configuration is ignored if
log.message.timestamp.type=LogAppendTime.";
public static final String LOG_MESSAGE_TIMESTAMP_AFTER_MAX_MS_CONFIG =
ServerTopicConfigSynonyms.serverSynonym(TopicConfig.MESSAGE_TIMESTAMP_AFTER_MAX_MS_CONFIG);
- public static final long LOG_MESSAGE_TIMESTAMP_AFTER_MAX_MS_DEFAULT =
Long.MAX_VALUE;
+ public static final long LOG_MESSAGE_TIMESTAMP_AFTER_MAX_MS_DEFAULT =
3600000; // 1 hour
public static final String LOG_MESSAGE_TIMESTAMP_AFTER_MAX_MS_DOC = "This
configuration sets the allowable timestamp difference between the " +
- "message timestamp and the broker's timestamp. The message
timestamp can be later than or equal to the broker's " +
+ "message timestamp and the broker's timestamp (default is 1 hour).
The message timestamp can be later than or equal to the broker's " +
"timestamp, with the maximum allowable difference determined by
the value set in this configuration. " +
"If log.message.timestamp.type=CreateTime, the message will be
rejected if the difference in timestamps exceeds " +
"this specified threshold. This configuration is ignored if
log.message.timestamp.type=LogAppendTime.";
public static final String NUM_RECOVERY_THREADS_PER_DATA_DIR_CONFIG =
"num.recovery.threads.per.data.dir";
- public static final int NUM_RECOVERY_THREADS_PER_DATA_DIR_DEFAULT = 1;
- public static final String NUM_RECOVERY_THREADS_PER_DATA_DIR_DOC = "The
number of threads per data directory to be used for log recovery at startup and
flushing at shutdown";
+ public static final int NUM_RECOVERY_THREADS_PER_DATA_DIR_DEFAULT = 2;
+ public static final String NUM_RECOVERY_THREADS_PER_DATA_DIR_DOC = "The
number of threads (default of 2) per data directory to be used for log recovery
at startup and flushing at shutdown";
Review Comment:
we do not need to specify default value in this sentence because it is
automatically populated in the documentation. For example, see:
<img width="639" alt="Screenshot 2024-12-09 at 22 15 45"
src="https://github.com/user-attachments/assets/bc58204f-1cb3-4743-831e-dc14fa1418cd">
--
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]