kamalcph commented on code in PR #16834:
URL: https://github.com/apache/kafka/pull/16834#discussion_r1715731073
##########
server/src/main/java/org/apache/kafka/server/config/ReplicationConfigs.java:
##########
@@ -136,6 +136,10 @@ public class ReplicationConfigs {
public static final String REPLICA_SELECTOR_CLASS_CONFIG =
"replica.selector.class";
public static final String REPLICA_SELECTOR_CLASS_DOC = "The fully
qualified class name that implements ReplicaSelector. This is used by the
broker to find the preferred read replica. By default, we use an implementation
that returns the leader.";
+ public static final String FOLLOWER_FETCH_LAST_TIERED_OFFSET_ENABLE_CONFIG
= "follower.fetch.last.tiered.offset.enable";
+ public static final String FOLLOWER_FETCH_LAST_TIERED_OFFSET_ENABLE_DOC =
"If enabled, an empty follower will skip replicating offsets up to the last
tiered offset and start from the next offset.";
Review Comment:
The doc is not clear, can we update it to make it clear for the users. From
KIP:
```
Whether the last tiered offset should be used as the start offset for
bootstrapping an empty follower
```
##########
core/src/test/scala/unit/kafka/server/DynamicBrokerConfigTest.scala:
##########
@@ -965,6 +965,31 @@ class DynamicBrokerConfigTest {
verifyNoMoreInteractions(remoteLogManager)
}
+ @Test
+ def testEnableFollowerFetchLastTieredOffset(): Unit = {
+ val props = TestUtils.createBrokerConfig(0, TestUtils.MockZkConnect, port
= 9092)
+ val config = KafkaConfig.fromProps(props)
+ val serverMock: KafkaServer = mock(classOf[KafkaServer])
Review Comment:
can we mock the trait KafkaBroker instead?
```suggestion
val serverMock: KafkaBroker = mock(classOf[KafkaBroker])
```
--
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]