Re: [PR] KAFKA-15716: KRaft support in EpochDrivenReplicationProtocolAcceptanceTest [kafka]

2024-06-11 Thread via GitHub


github-actions[bot] commented on PR #15295:
URL: https://github.com/apache/kafka/pull/15295#issuecomment-2162038395

   This PR is being marked as stale since it has not had any activity in 90 
days. If you would like to keep this PR alive, please ask a committer for 
review. If the PR has  merge conflicts, please update it with the latest from 
trunk (or appropriate release branch)  If this PR is no longer valid or 
desired, please feel free to close it. If no activity occurs in the next 30 
days, it will be automatically closed.


-- 
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-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15716: KRaft support in EpochDrivenReplicationProtocolAcceptanceTest [kafka]

2024-03-13 Thread via GitHub


mimaison commented on code in PR #15295:
URL: https://github.com/apache/kafka/pull/15295#discussion_r1522868135


##
core/src/test/scala/unit/kafka/server/epoch/EpochDrivenReplicationProtocolAcceptanceTest.scala:
##
@@ -130,15 +144,22 @@ class EpochDrivenReplicationProtocolAcceptanceTest 
extends QuorumTestHarness wit
 assertEquals(java.util.Arrays.asList(new EpochEntry(0, 0), new 
EpochEntry(1, 1), new EpochEntry(2, 2)), epochCache(follower).epochEntries)
   }
 
-  @Test
-  def shouldNotAllowDivergentLogs(): Unit = {
+
+  @ParameterizedTest(name = TestInfoUtils.TestWithParameterizedQuorumName)
+  @ValueSource(strings = Array("zk", "kraft"))
+  def shouldNotAllowDivergentLogs(quorum: String): Unit = {
+if (quorum == "kraft" && metadataVersion.isLessThan(IBP_3_3_IV0)) {

Review Comment:
   Why is this metadata check needed? can you explain it?



##
core/src/test/scala/unit/kafka/server/epoch/EpochDrivenReplicationProtocolAcceptanceTest.scala:
##
@@ -53,17 +58,26 @@ class EpochDrivenReplicationProtocolAcceptanceTest extends 
QuorumTestHarness wit
   val topic = "topic1"
   val msg = new Array[Byte](1000)
   val msgBigger = new Array[Byte](1)
-  var brokers: Seq[KafkaServer] = _
+  var brokers: Seq[KafkaBroker] = _
   var producer: KafkaProducer[Array[Byte], Array[Byte]] = _
   var consumer: Consumer[Array[Byte], Array[Byte]] = _
 
+  private def securityProtocol: SecurityProtocol = SecurityProtocol.PLAINTEXT
+  private def listenerName: ListenerName = 
ListenerName.forSecurityProtocol(securityProtocol)
+
   @BeforeEach
   override def setUp(testInfo: TestInfo): Unit = {
+if (TestInfoUtils.isKRaft(testInfo)) {

Review Comment:
   Why are we not running `setUp()` in KRaft mode?



-- 
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-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15716: KRaft support in EpochDrivenReplicationProtocolAcceptanceTest [kafka]

2024-03-12 Thread via GitHub


highluck commented on code in PR #15295:
URL: https://github.com/apache/kafka/pull/15295#discussion_r1522384690


##
core/src/test/scala/unit/kafka/server/epoch/EpochDrivenReplicationProtocolAcceptanceTest.scala:
##
@@ -53,17 +58,26 @@ class EpochDrivenReplicationProtocolAcceptanceTest extends 
QuorumTestHarness wit
   val topic = "topic1"
   val msg = new Array[Byte](1000)
   val msgBigger = new Array[Byte](1)
-  var brokers: Seq[KafkaServer] = _
+  var brokers: Seq[KafkaBroker] = _
   var producer: KafkaProducer[Array[Byte], Array[Byte]] = _
   var consumer: Consumer[Array[Byte], Array[Byte]] = _
 
+  private def securityProtocol: SecurityProtocol = SecurityProtocol.PLAINTEXT
+  private def listenerName: ListenerName = 
ListenerName.forSecurityProtocol(securityProtocol)
+
   @BeforeEach
   override def setUp(testInfo: TestInfo): Unit = {
+if (TestInfoUtils.isKRaft(testInfo) && 
metadataVersion.isLessThan(IBP_3_3_IV0)) {

Review Comment:
   Oh thank you! It seems unnecessary. I'll edit 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-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15716: KRaft support in EpochDrivenReplicationProtocolAcceptanceTest [kafka]

2024-03-12 Thread via GitHub


highluck commented on PR #15295:
URL: https://github.com/apache/kafka/pull/15295#issuecomment-1993132575

   @mimaison
   thanks for review
   
   I felt like I needed to think a little more, so I thought it would be a good 
idea to work on a follow-up PR.
   This is because the test does not work with the broker structure currently 
in use.
   When the current work is finished, I will do a follow-up work!


-- 
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-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15716: KRaft support in EpochDrivenReplicationProtocolAcceptanceTest [kafka]

2024-02-26 Thread via GitHub


mimaison commented on code in PR #15295:
URL: https://github.com/apache/kafka/pull/15295#discussion_r1502397230


##
core/src/test/scala/unit/kafka/server/epoch/EpochDrivenReplicationProtocolAcceptanceTest.scala:
##
@@ -53,17 +58,26 @@ class EpochDrivenReplicationProtocolAcceptanceTest extends 
QuorumTestHarness wit
   val topic = "topic1"
   val msg = new Array[Byte](1000)
   val msgBigger = new Array[Byte](1)
-  var brokers: Seq[KafkaServer] = _
+  var brokers: Seq[KafkaBroker] = _
   var producer: KafkaProducer[Array[Byte], Array[Byte]] = _
   var consumer: Consumer[Array[Byte], Array[Byte]] = _
 
+  private def securityProtocol: SecurityProtocol = SecurityProtocol.PLAINTEXT
+  private def listenerName: ListenerName = 
ListenerName.forSecurityProtocol(securityProtocol)
+
   @BeforeEach
   override def setUp(testInfo: TestInfo): Unit = {
+if (TestInfoUtils.isKRaft(testInfo) && 
metadataVersion.isLessThan(IBP_3_3_IV0)) {

Review Comment:
   Can you explain why we need this change? `metadataVersion` is hard coded to 
`MetadataVersion.latestTesting`, how can it be less than `IBP_3_3_IV0`?



-- 
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-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15716: KRaft support in EpochDrivenReplicationProtocolAcceptanceTest [kafka]

2024-02-24 Thread via GitHub


highluck commented on PR #15295:
URL: https://github.com/apache/kafka/pull/15295#issuecomment-1962326652

   @mimaison @pasharik 
   thanks for review!
   I edited 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-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org