You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "kamalcph (via GitHub)" <gi...@apache.org> on 2023/08/16 15:50:59 UTC

[GitHub] [kafka] kamalcph commented on a diff in pull request #14212: MINOR: Add test case for follower fetch

kamalcph commented on code in PR #14212:
URL: https://github.com/apache/kafka/pull/14212#discussion_r1296115935


##########
core/src/test/scala/unit/kafka/server/ReplicaFetcherTierStateMachineTest.scala:
##########
@@ -85,6 +85,73 @@ class ReplicaFetcherTierStateMachineTest {
     assertEquals(9L, replicaState.logEndOffset)
   }
 
+  /**
+   * This test verifies the following scenario:
+   * 1. Leader is archiving to tiered storage and has a follower.
+   * 2. Follower has caught up to offset X (exclusive).
+   * 3. While follower is offline, leader moves X to tiered storage and expires data locally till Y, such that,
+   *    `Y = leaderLocalLogStartOffset` and `leaderLocalLogStartOffset > X`. Meanwhile, X has been expired from
+   *    tiered storage as well. Hence, `X < globalLogStartOffset`.
+   * 4. Follower comes online and tries to fetch X from leader.
+   */
+  @Test
+  def testFollowerFetchMovedToAndDeletedFromTieredStore(): Unit = {

Review Comment:
   Can the test be renamed to `testFollowerFetchOffsetOutOfRangeWithTieredStore`?



-- 
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