[GitHub] [kafka] dengziming commented on a diff in pull request #12106: KAFKA-13861: Fix the validateOnly behavior for CreatePartitions requests in KRaft mode
dengziming commented on code in PR #12106: URL: https://github.com/apache/kafka/pull/12106#discussion_r864312925 ## core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala: ## @@ -490,7 +490,12 @@ class PlaintextAdminIntegrationTest extends BaseAdminIntegrationTest { var e = assertThrows(classOf[ExecutionException], () => alterResult.values.get(topic1).get, () => s"$desc: Expect InvalidPartitionsException when newCount is a decrease") assertTrue(e.getCause.isInstanceOf[InvalidPartitionsException], desc) - assertEquals("Topic currently has 3 partitions, which is higher than the requested 1.", e.getCause.getMessage, desc) + var exceptionMsgStr = if (TestInfoUtils.isKRaft(testInfo)) { Review Comment: nit: We can directly use `isKRaftTest()` here, the below as well. -- 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
[GitHub] [kafka] dengziming commented on a diff in pull request #12106: KAFKA-13861: Fix the validateOnly behavior for CreatePartitions requests in KRaft mode
dengziming commented on code in PR #12106: URL: https://github.com/apache/kafka/pull/12106#discussion_r861427340 ## core/src/main/scala/kafka/server/ControllerApis.scala: ## @@ -767,7 +767,7 @@ class ControllerApis(val requestChannel: RequestChannel, setErrorCode(TOPIC_AUTHORIZATION_FAILED.code)) } } -controller.createPartitions(context, topics).thenApply { results => +controller.createPartitions(context, topics, request.validateOnly()).thenApply { results => Review Comment: Good catch, it seems we don't have a test case for this problem, to cover this we should change `PlaintextAdminIntegrationTest.testCreatePartitions` to support 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
[GitHub] [kafka] dengziming commented on a diff in pull request #12106: KAFKA-13861: Fix the validateOnly behavior for CreatePartitions requests in KRaft mode
dengziming commented on code in PR #12106: URL: https://github.com/apache/kafka/pull/12106#discussion_r861427340 ## core/src/main/scala/kafka/server/ControllerApis.scala: ## @@ -767,7 +767,7 @@ class ControllerApis(val requestChannel: RequestChannel, setErrorCode(TOPIC_AUTHORIZATION_FAILED.code)) } } -controller.createPartitions(context, topics).thenApply { results => +controller.createPartitions(context, topics, request.validateOnly()).thenApply { results => Review Comment: Good catch, it seems we don't have a test case for this problem, to cover this we should change `PlaintextAdminIntegrationTest` to support 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
[GitHub] [kafka] dengziming commented on a diff in pull request #12106: KAFKA-13861: Fix the validateOnly behavior for CreatePartitions requests in KRaft mode
dengziming commented on code in PR #12106: URL: https://github.com/apache/kafka/pull/12106#discussion_r861427340 ## core/src/main/scala/kafka/server/ControllerApis.scala: ## @@ -767,7 +767,7 @@ class ControllerApis(val requestChannel: RequestChannel, setErrorCode(TOPIC_AUTHORIZATION_FAILED.code)) } } -controller.createPartitions(context, topics).thenApply { results => +controller.createPartitions(context, topics, request.validateOnly()).thenApply { results => Review Comment: Good catch, it seems we don't have a test case for this problem, maybe we can change `PlaintextAdminIntegrationTest` to support 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