You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "PoAn Yang (Jira)" <ji...@apache.org> on 2025/03/29 15:27:00 UTC
[jira] [Commented] (KAFKA-15667) preCheck the invalid configuration for tiered storage replication factor
[ https://issues.apache.org/jira/browse/KAFKA-15667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17939418#comment-17939418 ]
PoAn Yang commented on KAFKA-15667:
-----------------------------------
Hi [~showuon], this issue may not be valid after 4.0. In [KIP-966|https://cwiki.apache.org/confluence/display/KAFKA/KIP-966%3A+Eligible+Leader+Replicas], it sets effective min.insync.replicas as min(min.insync.replicas, replication factor). Even if remote.log.metadata.topic.replication.factor is less than min.insync.replicas, the producer still can write record to the topic. I use following code to test the concept and it can pass without error.
{noformat}
@ClusterTest(
types = {Type.CO_KRAFT},
brokers = 3,
serverProperties = {
@ClusterConfigProperty(key = "min.insync.replicas", value = "3")
}
)
public void testMinInsyncReplicas(ClusterInstance clusterInstance) throws ExecutionException, InterruptedException {
clusterInstance.createTopic("test", 1, (short) 1);
try (Producer<byte[], byte[]> producer = clusterInstance.producer();
Consumer<byte[], byte[]> consumer = clusterInstance.consumer()) {
RecordMetadata recordMetadata = producer.send(new ProducerRecord<>("test", "key".getBytes(), "value".getBytes())).get();
assertEquals(0, recordMetadata.offset());
consumer.subscribe(List.of("test"));
TestUtils.waitForCondition(() -> {
ConsumerRecords<byte[], byte[]> records = consumer.poll(Duration.ofMillis(100));
return records.count() == 1;
}, "Failed to receive message");
}
}
{noformat}
> preCheck the invalid configuration for tiered storage replication factor
> ------------------------------------------------------------------------
>
> Key: KAFKA-15667
> URL: https://issues.apache.org/jira/browse/KAFKA-15667
> Project: Kafka
> Issue Type: Improvement
> Components: Tiered-Storage
> Affects Versions: 3.6.0
> Reporter: Luke Chen
> Assignee: PoAn Yang
> Priority: Major
>
> `remote.log.metadata.topic.replication.factor` is a config to set the Replication factor of remote log metadata topic. For the `min.insync.replicas`, we'll use the broker config. Today, if the `remote.log.metadata.topic.replication.factor` < `min.insync.replicas` value, everything still works until new remote log metadata records created. We should be able to identify it when broker startup to notify users to fix the invalid config.
> ref: https://kafka.apache.org/documentation/#remote_log_metadata_manager_remote.log.metadata.topic.replication.factor
--
This message was sent by Atlassian Jira
(v8.20.10#820010)