You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "jayteej (via GitHub)" <gi...@apache.org> on 2024/12/11 13:44:30 UTC
[PR] KAFKA-16368: segment.bytes constraints to min 1MB [kafka]
jayteej opened a new pull request, #18140:
URL: https://github.com/apache/kafka/pull/18140
Updates segment.bytes/log.segment.bytes constraints to minimum of 1MB.
Unit tests relying on this for segment roll have been updated.
Core tests passing.
--
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-16368: segment.bytes constraints to min 1MB [kafka]
Posted by "jayteej (via GitHub)" <gi...@apache.org>.
jayteej commented on code in PR #18140:
URL: https://github.com/apache/kafka/pull/18140#discussion_r1917209846
##########
core/src/test/java/kafka/admin/DeleteTopicTest.java:
##########
@@ -239,7 +239,7 @@ public void testDeleteNonExistingTopic(ClusterInstance cluster) throws Exception
@ClusterTest(serverProperties = {
@ClusterConfigProperty(key = "log.cleaner.enable", value = "true"),
@ClusterConfigProperty(key = "log.cleanup.policy", value = "compact"),
- @ClusterConfigProperty(key = "log.segment.bytes", value = "100"),
+ @ClusterConfigProperty(key = "log.segment.bytes", value = "1048576"),
Review Comment:
I will make this change before we merge
--
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-16368: segment.bytes constraints to min 1MB [kafka]
Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya commented on code in PR #18140:
URL: https://github.com/apache/kafka/pull/18140#discussion_r1918156206
##########
core/src/test/java/kafka/admin/DeleteTopicTest.java:
##########
@@ -239,7 +239,7 @@ public void testDeleteNonExistingTopic(ClusterInstance cluster) throws Exception
@ClusterTest(serverProperties = {
@ClusterConfigProperty(key = "log.cleaner.enable", value = "true"),
@ClusterConfigProperty(key = "log.cleanup.policy", value = "compact"),
- @ClusterConfigProperty(key = "log.segment.bytes", value = "100"),
+ @ClusterConfigProperty(key = "log.segment.bytes", value = "1048576"),
Review Comment:
The tests pass now. This is the only thing left prior to merging. Can you please change this.
--
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-16368: segment.bytes constraints to min 1MB [kafka]
Posted by "junrao (via GitHub)" <gi...@apache.org>.
junrao commented on PR #18140:
URL: https://github.com/apache/kafka/pull/18140#issuecomment-2758776560
@jayteej : Thanks for the PR and sorry for chiming in late. The KIP https://cwiki.apache.org/confluence/display/KAFKA/KIP-1030%3A+Change+constraints+and+default+values+for+various+configurations says that the new constraint applies at the topic level. I tried the following on 4.0/trunk and it seems that the constraint isn't really applied at the topic level?
```
bash-3.2$ bin/kafka-configs.sh --alter --bootstrap-server localhost:9092 --topic test --add-config segment.bytes=1000
Completed updating config for topic test.
bash-3.2$ bin/kafka-configs.sh --describe --bootstrap-server localhost:9092 --topic test
Dynamic configs for topic test are:
segment.bytes=1000 sensitive=false synonyms={DYNAMIC_TOPIC_CONFIG:segment.bytes=1000, STATIC_BROKER_CONFIG:log.segment.bytes=1073741824, DEFAULT_CONFIG:log.segment.bytes=1073741824}
```
--
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-16368: segment.bytes constraints to min 1MB [kafka]
Posted by "junrao (via GitHub)" <gi...@apache.org>.
junrao commented on PR #18140:
URL: https://github.com/apache/kafka/pull/18140#issuecomment-2773915601
Filed https://issues.apache.org/jira/browse/KAFKA-19080 to track this.
--
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-16368: segment.bytes constraints to min 1MB [kafka]
Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya commented on code in PR #18140:
URL: https://github.com/apache/kafka/pull/18140#discussion_r1880421924
##########
core/src/test/java/kafka/admin/DeleteTopicTest.java:
##########
@@ -239,7 +239,7 @@ public void testDeleteNonExistingTopic(ClusterInstance cluster) throws Exception
@ClusterTest(serverProperties = {
@ClusterConfigProperty(key = "log.cleaner.enable", value = "true"),
@ClusterConfigProperty(key = "log.cleanup.policy", value = "compact"),
- @ClusterConfigProperty(key = "log.segment.bytes", value = "100"),
+ @ClusterConfigProperty(key = "log.segment.bytes", value = "1048576"),
Review Comment:
does this test really need this config? From what it looks like it does the following:
1. create a topic
2. Write 100 X 3 entries where 100 entries are duplicated
3. Waits for cleaning to complete until 0 offset <-- this looks wrong
4. Deletes the topic
5. Verifies topic deletion
Why do we need a segment roll here? (unless I am missing something)
##########
core/src/test/scala/integration/kafka/server/DynamicBrokerReconfigurationTest.scala:
##########
@@ -625,7 +626,7 @@ class DynamicBrokerReconfigurationTest extends QuorumTestHarness with SaslSetup
"Config not updated in LogManager")
val log = servers.head.logManager.getLog(new TopicPartition(topic, 0)).getOrElse(throw new IllegalStateException("Log not found"))
- TestUtils.waitUntilTrue(() => log.config.segmentSize == 4000, "Existing topic config using defaults not updated")
+ TestUtils.waitUntilTrue(() => log.config.segmentSize == 1048576, "Existing topic config using defaults not updated")
Review Comment:
You will need to change validation in line 641 as well to retain the original intention of this test `log.logSegments.asScala.exists(_.size > 3000)`
##########
core/src/test/scala/integration/kafka/server/DynamicBrokerReconfigurationTest.scala:
##########
@@ -610,11 +610,12 @@ class DynamicBrokerReconfigurationTest extends QuorumTestHarness with SaslSetup
props.put(ServerLogConfigs.LOG_MESSAGE_TIMESTAMP_BEFORE_MAX_MS_CONFIG, "1000")
props.put(ServerLogConfigs.LOG_MESSAGE_TIMESTAMP_AFTER_MAX_MS_CONFIG, "1000")
props.put(ServerLogConfigs.LOG_MESSAGE_DOWNCONVERSION_ENABLE_CONFIG, "false")
- reconfigureServers(props, perBrokerConfig = false, (ServerLogConfigs.LOG_SEGMENT_BYTES_CONFIG, "4000"))
+ reconfigureServers(props, perBrokerConfig = false, (ServerLogConfigs.LOG_SEGMENT_BYTES_CONFIG, "1048576"))
// Verify that all broker defaults have been updated
servers.foreach { server =>
props.forEach { (k, v) =>
+ TestUtils.waitUntilTrue(() => server.config.originals.get(k) != null, "Configs not present")
Review Comment:
Thank you for adding this.
##########
core/src/test/scala/integration/kafka/server/DynamicBrokerReconfigurationTest.scala:
##########
@@ -610,11 +610,12 @@ class DynamicBrokerReconfigurationTest extends QuorumTestHarness with SaslSetup
props.put(ServerLogConfigs.LOG_MESSAGE_TIMESTAMP_BEFORE_MAX_MS_CONFIG, "1000")
props.put(ServerLogConfigs.LOG_MESSAGE_TIMESTAMP_AFTER_MAX_MS_CONFIG, "1000")
props.put(ServerLogConfigs.LOG_MESSAGE_DOWNCONVERSION_ENABLE_CONFIG, "false")
- reconfigureServers(props, perBrokerConfig = false, (ServerLogConfigs.LOG_SEGMENT_BYTES_CONFIG, "4000"))
+ reconfigureServers(props, perBrokerConfig = false, (ServerLogConfigs.LOG_SEGMENT_BYTES_CONFIG, "1048576"))
Review Comment:
This test doesn't really care about the new value that we are reconfiguring it to as long it is a valid value. It just tests if the reconfiguration is successful.
Could we set it to something like 2GB? It will ensure that if we change the constraint again in future, we wouldn't have to modify this test.
##########
core/src/test/scala/unit/kafka/server/KafkaConfigTest.scala:
##########
@@ -1188,7 +1188,7 @@ class KafkaConfigTest {
case TopicConfig.COMPRESSION_ZSTD_LEVEL_CONFIG =>
assertDynamic(kafkaConfigProp, "5", () => config.zstdCompressionLevel)
case TopicConfig.SEGMENT_BYTES_CONFIG =>
- assertDynamic(kafkaConfigProp, 10000, () => config.logSegmentBytes)
+ assertDynamic(kafkaConfigProp, 1048576, () => config.logSegmentBytes)
Review Comment:
Doesn't have to be the min possible value. A very large value like 2GB will ensure that we don't have to change it in future
##########
core/src/test/scala/unit/kafka/server/LogOffsetTest.scala:
##########
@@ -224,14 +224,14 @@ class LogOffsetTest extends BaseRequestTest {
val now = Time.SYSTEM.milliseconds + 30000 // pretend it is the future to avoid race conditions with the fs
val offsets = log.legacyFetchOffsetsBefore(now, 15)
- assertEquals(Seq(20L, 18L, 16L, 14L, 12L, 10L, 8L, 6L, 4L, 2L, 0L), offsets)
+ assertEquals(Seq(20L, 0L), offsets)
TestUtils.waitUntilTrue(() => isLeaderLocalOnBroker(topic, topicPartition.partition, broker),
"Leader should be elected")
val request = ListOffsetsRequest.Builder.forReplica(0, 0)
.setTargetTimes(buildTargetTimes(topicPartition, now, 15).asJava).build()
val consumerOffsets = findPartition(sendListOffsetsRequest(request).topics.asScala, topicPartition).oldStyleOffsets.asScala
- assertEquals(Seq(20L, 18L, 16L, 14L, 12L, 10L, 8L, 6L, 4L, 2L, 0L), consumerOffsets)
Review Comment:
can you please help me understanding this change?
--
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-16368: segment.bytes constraints to min 1MB [kafka]
Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya commented on code in PR #18140:
URL: https://github.com/apache/kafka/pull/18140#discussion_r1916734948
##########
core/src/test/scala/unit/kafka/server/LogOffsetTest.scala:
##########
@@ -52,7 +52,7 @@ class LogOffsetTest extends BaseRequestTest {
props.put("num.partitions", "20")
props.put("log.retention.hours", "10")
props.put("log.retention.check.interval.ms", (5 * 1000 * 60).toString)
- props.put("log.segment.bytes", "140")
+ props.put("log.segment.bytes", "1048576")
Review Comment:
Is this still needed in this iteration of the review? Earlier we were changing tests in this file.
--
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-16368: segment.bytes constraints to min 1MB [kafka]
Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya commented on code in PR #18140:
URL: https://github.com/apache/kafka/pull/18140#discussion_r1917061349
##########
core/src/test/java/kafka/admin/DeleteTopicTest.java:
##########
@@ -239,7 +239,7 @@ public void testDeleteNonExistingTopic(ClusterInstance cluster) throws Exception
@ClusterTest(serverProperties = {
@ClusterConfigProperty(key = "log.cleaner.enable", value = "true"),
@ClusterConfigProperty(key = "log.cleanup.policy", value = "compact"),
- @ClusterConfigProperty(key = "log.segment.bytes", value = "100"),
+ @ClusterConfigProperty(key = "log.segment.bytes", value = "1048576"),
Review Comment:
@jayteej thoughts on this?
--
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-16368: segment.bytes constraints to min 1MB [kafka]
Posted by "jayteej (via GitHub)" <gi...@apache.org>.
jayteej commented on PR #18140:
URL: https://github.com/apache/kafka/pull/18140#issuecomment-2536032865
@divijvaidya
--
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-16368: segment.bytes constraints to min 1MB [kafka]
Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya commented on PR #18140:
URL: https://github.com/apache/kafka/pull/18140#issuecomment-2595972187
The `ClientIdQuotaTest` have known flaky failure in trunk - https://ge.apache.org/scans/tests?search.rootProjectNames=kafka&search.tags=trunk&search.timeZoneId=Europe%2FBerlin&tests.container=kafka.api.ClientIdQuotaTest
I am merging this PR since other tests are successful.
--
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-16368: segment.bytes constraints to min 1MB [kafka]
Posted by "jayteej (via GitHub)" <gi...@apache.org>.
jayteej commented on code in PR #18140:
URL: https://github.com/apache/kafka/pull/18140#discussion_r1884176073
##########
core/src/test/scala/integration/kafka/server/DynamicBrokerReconfigurationTest.scala:
##########
@@ -625,7 +626,7 @@ class DynamicBrokerReconfigurationTest extends QuorumTestHarness with SaslSetup
"Config not updated in LogManager")
val log = servers.head.logManager.getLog(new TopicPartition(topic, 0)).getOrElse(throw new IllegalStateException("Log not found"))
- TestUtils.waitUntilTrue(() => log.config.segmentSize == 4000, "Existing topic config using defaults not updated")
+ TestUtils.waitUntilTrue(() => log.config.segmentSize == 1048576, "Existing topic config using defaults not updated")
Review Comment:
I will have to improve the produce/consume part of this test to fill a 1MB segment. I will have a go at this.
--
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-16368: segment.bytes constraints to min 1MB [kafka]
Posted by "jayteej (via GitHub)" <gi...@apache.org>.
jayteej commented on code in PR #18140:
URL: https://github.com/apache/kafka/pull/18140#discussion_r1884176073
##########
core/src/test/scala/integration/kafka/server/DynamicBrokerReconfigurationTest.scala:
##########
@@ -625,7 +626,7 @@ class DynamicBrokerReconfigurationTest extends QuorumTestHarness with SaslSetup
"Config not updated in LogManager")
val log = servers.head.logManager.getLog(new TopicPartition(topic, 0)).getOrElse(throw new IllegalStateException("Log not found"))
- TestUtils.waitUntilTrue(() => log.config.segmentSize == 4000, "Existing topic config using defaults not updated")
+ TestUtils.waitUntilTrue(() => log.config.segmentSize == 1048576, "Existing topic config using defaults not updated")
Review Comment:
I will have to improve the produce/consume part of this test to fill a 1MB segment. I will have a go at this. There is complexity because it is racey and the default producer is sending to 10 partitions.
--
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-16368: segment.bytes constraints to min 1MB [kafka]
Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya commented on code in PR #18140:
URL: https://github.com/apache/kafka/pull/18140#discussion_r1917060814
##########
core/src/test/scala/unit/kafka/server/KafkaConfigTest.scala:
##########
@@ -1188,7 +1188,7 @@ class KafkaConfigTest {
case TopicConfig.COMPRESSION_ZSTD_LEVEL_CONFIG =>
assertDynamic(kafkaConfigProp, "5", () => config.zstdCompressionLevel)
case TopicConfig.SEGMENT_BYTES_CONFIG =>
- assertDynamic(kafkaConfigProp, 10000, () => config.logSegmentBytes)
+ assertDynamic(kafkaConfigProp, 1048576, () => config.logSegmentBytes)
Review Comment:
ok
--
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-16368: segment.bytes constraints to min 1MB [kafka]
Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on PR #18140:
URL: https://github.com/apache/kafka/pull/18140#issuecomment-2596875075
Was there any increase in test time due to requiring larger segments? We could make it possible for tests to set it lower.
--
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-16368: segment.bytes constraints to min 1MB [kafka]
Posted by "jayteej (via GitHub)" <gi...@apache.org>.
jayteej commented on code in PR #18140:
URL: https://github.com/apache/kafka/pull/18140#discussion_r1883814714
##########
core/src/test/scala/unit/kafka/server/LogOffsetTest.scala:
##########
@@ -224,14 +224,14 @@ class LogOffsetTest extends BaseRequestTest {
val now = Time.SYSTEM.milliseconds + 30000 // pretend it is the future to avoid race conditions with the fs
val offsets = log.legacyFetchOffsetsBefore(now, 15)
- assertEquals(Seq(20L, 18L, 16L, 14L, 12L, 10L, 8L, 6L, 4L, 2L, 0L), offsets)
+ assertEquals(Seq(20L, 0L), offsets)
TestUtils.waitUntilTrue(() => isLeaderLocalOnBroker(topic, topicPartition.partition, broker),
"Leader should be elected")
val request = ListOffsetsRequest.Builder.forReplica(0, 0)
.setTargetTimes(buildTargetTimes(topicPartition, now, 15).asJava).build()
val consumerOffsets = findPartition(sendListOffsetsRequest(request).topics.asScala, topicPartition).oldStyleOffsets.asScala
- assertEquals(Seq(20L, 18L, 16L, 14L, 12L, 10L, 8L, 6L, 4L, 2L, 0L), consumerOffsets)
Review Comment:
Because we increased the segment size, there is now one segment and therefore less offsets returned by the API call.
--
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-16368: segment.bytes constraints to min 1MB [kafka]
Posted by "jayteej (via GitHub)" <gi...@apache.org>.
jayteej commented on code in PR #18140:
URL: https://github.com/apache/kafka/pull/18140#discussion_r1884175051
##########
core/src/test/scala/unit/kafka/server/KafkaConfigTest.scala:
##########
@@ -1188,7 +1188,7 @@ class KafkaConfigTest {
case TopicConfig.COMPRESSION_ZSTD_LEVEL_CONFIG =>
assertDynamic(kafkaConfigProp, "5", () => config.zstdCompressionLevel)
case TopicConfig.SEGMENT_BYTES_CONFIG =>
- assertDynamic(kafkaConfigProp, 10000, () => config.logSegmentBytes)
+ assertDynamic(kafkaConfigProp, 1048576, () => config.logSegmentBytes)
Review Comment:
This test uses produce/consume and checks segment sizes. A large value will not be possible without a larger refactor of the test utils responsible for produce/consume.
--
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-16368: segment.bytes constraints to min 1MB [kafka]
Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya commented on code in PR #18140:
URL: https://github.com/apache/kafka/pull/18140#discussion_r1916346187
##########
core/src/test/java/kafka/admin/DeleteTopicTest.java:
##########
@@ -239,7 +239,7 @@ public void testDeleteNonExistingTopic(ClusterInstance cluster) throws Exception
@ClusterTest(serverProperties = {
@ClusterConfigProperty(key = "log.cleaner.enable", value = "true"),
@ClusterConfigProperty(key = "log.cleanup.policy", value = "compact"),
- @ClusterConfigProperty(key = "log.segment.bytes", value = "100"),
+ @ClusterConfigProperty(key = "log.segment.bytes", value = "1048576"),
Review Comment:
You can change it like this
```
--- a/core/src/test/java/kafka/admin/DeleteTopicTest.java
+++ b/core/src/test/java/kafka/admin/DeleteTopicTest.java
@@ -57,6 +57,7 @@ import java.util.concurrent.ExecutionException;
import java.util.function.Supplier;
import java.util.stream.Collectors;
+import scala.Option;
import scala.jdk.javaapi.OptionConverters;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
@@ -239,7 +240,6 @@ public class DeleteTopicTest {
@ClusterTest(serverProperties = {
@ClusterConfigProperty(key = "log.cleaner.enable", value = "true"),
@ClusterConfigProperty(key = "log.cleanup.policy", value = "compact"),
- @ClusterConfigProperty(key = "log.segment.bytes", value = "100"),
@ClusterConfigProperty(key = "log.cleaner.dedupe.buffer.size", value = "1048577")
})
public void testDeleteTopicWithCleaner(ClusterInstance cluster) throws Exception {
@@ -252,6 +252,8 @@ public class DeleteTopicTest {
"Replicas for topic test not created.");
UnifiedLog log = server.logManager().getLog(topicPartition, false).get();
writeDups(100, 3, log);
+ // force roll the segment so that cleaner can work on it
+ server.logManager().getLog(topicPartition, false).get().roll(Option.empty());
// wait for cleaner to clean
server.logManager().cleaner().awaitCleaned(topicPartition, 0, 60000);
admin.deleteTopics(List.of(DEFAULT_TOPIC)).all().get();
```
and the test will pass
--
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-16368: segment.bytes constraints to min 1MB [kafka]
Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya merged PR #18140:
URL: https://github.com/apache/kafka/pull/18140
--
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-16368: segment.bytes constraints to min 1MB [kafka]
Posted by "jayteej (via GitHub)" <gi...@apache.org>.
jayteej commented on code in PR #18140:
URL: https://github.com/apache/kafka/pull/18140#discussion_r1918186537
##########
core/src/test/java/kafka/admin/DeleteTopicTest.java:
##########
@@ -239,7 +239,7 @@ public void testDeleteNonExistingTopic(ClusterInstance cluster) throws Exception
@ClusterTest(serverProperties = {
@ClusterConfigProperty(key = "log.cleaner.enable", value = "true"),
@ClusterConfigProperty(key = "log.cleanup.policy", value = "compact"),
- @ClusterConfigProperty(key = "log.segment.bytes", value = "100"),
+ @ClusterConfigProperty(key = "log.segment.bytes", value = "1048576"),
Review Comment:
Done
--
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