You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Rancho-7 (via GitHub)" <gi...@apache.org> on 2025/06/08 04:18:26 UTC

[PR] KAFKA-18486:Remove ReplicaManager#becomeLeaderOrFollower in `testReplicaAlterLogDirs` [kafka]

Rancho-7 opened a new pull request, #19922:
URL: https://github.com/apache/kafka/pull/19922

   jira: https://issues.apache.org/jira/browse/KAFKA-18486
   
   Remove ReplicaManager#becomeLeaderOrFollower in `testReplicaAlterLogDirs`.


-- 
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-18486:Remove ReplicaManager#becomeLeaderOrFollower in `testReplicaAlterLogDirs` [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #19922:
URL: https://github.com/apache/kafka/pull/19922


-- 
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-18486:Remove ReplicaManager#becomeLeaderOrFollower in `testReplicaAlterLogDirs` [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #19922:
URL: https://github.com/apache/kafka/pull/19922#discussion_r2145771137


##########
core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala:
##########
@@ -5880,13 +5881,9 @@ class ReplicaManagerTest {
         topicId = None
       )
 
-      val leaderAndIsrRequest = makeLeaderAndIsrRequest(
-        topicId = topicId,
-        topicPartition = tp,
-        replicas = Seq(0, 1),
-        leaderAndIsr = new LeaderAndIsr(0, List(0, 1).map(Int.box).asJava),
-      )
-      replicaManager.becomeLeaderOrFollower(0, leaderAndIsrRequest, (_, _) => ())
+      val leaderDelta = topicsCreateDelta(localId, isStartIdLeader = true, partitions = List(0, 1), List.empty, topic, topicIds(topic))

Review Comment:
   It seems to me that it is fine, as the extra partition (tp-1) does not impact the test.



-- 
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-18486:Remove ReplicaManager#becomeLeaderOrFollower in `testReplicaAlterLogDirs` [kafka]

Posted by "Yunyung (via GitHub)" <gi...@apache.org>.
Yunyung commented on code in PR #19922:
URL: https://github.com/apache/kafka/pull/19922#discussion_r2145732147


##########
core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala:
##########
@@ -5880,13 +5881,9 @@ class ReplicaManagerTest {
         topicId = None
       )
 
-      val leaderAndIsrRequest = makeLeaderAndIsrRequest(
-        topicId = topicId,
-        topicPartition = tp,
-        replicas = Seq(0, 1),
-        leaderAndIsr = new LeaderAndIsr(0, List(0, 1).map(Int.box).asJava),
-      )
-      replicaManager.becomeLeaderOrFollower(0, leaderAndIsrRequest, (_, _) => ())
+      val leaderDelta = topicsCreateDelta(localId, isStartIdLeader = true, partitions = List(0, 1), List.empty, topic, topicIds(topic))

Review Comment:
   This should be partitions = List(0), shouldn't it?



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