You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "splett2 (via GitHub)" <gi...@apache.org> on 2023/05/02 01:40:33 UTC
[GitHub] [kafka] splett2 opened a new pull request, #13655: MINOR: Reduce number of threads created for integration test brokers
splett2 opened a new pull request, #13655:
URL: https://github.com/apache/kafka/pull/13655
The integration tests seem to create an unnecessarily large number of threads. This reduces the number of threads created per integration test harness broker.
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
--
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
[GitHub] [kafka] jolshan merged pull request #13655: MINOR: Reduce number of threads created for integration test brokers
Posted by "jolshan (via GitHub)" <gi...@apache.org>.
jolshan merged PR #13655:
URL: https://github.com/apache/kafka/pull/13655
--
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
[GitHub] [kafka] splett2 commented on a diff in pull request #13655: MINOR: Reduce number of threads created for integration test brokers
Posted by "splett2 (via GitHub)" <gi...@apache.org>.
splett2 commented on code in PR #13655:
URL: https://github.com/apache/kafka/pull/13655#discussion_r1183105854
##########
core/src/test/scala/unit/kafka/server/DynamicBrokerConfigTest.scala:
##########
@@ -609,7 +609,10 @@ class DynamicBrokerConfigTest {
val zkClient: KafkaZkClient = mock(classOf[KafkaZkClient])
when(zkClient.getEntityConfigs(anyString(), anyString())).thenReturn(new java.util.Properties())
- val oldConfig = KafkaConfig.fromProps(TestUtils.createBrokerConfig(0, TestUtils.MockZkConnect, port = 9092))
+ val initialProps = TestUtils.createBrokerConfig(0, TestUtils.MockZkConnect, port = 9092)
Review Comment:
The `TestDynamicThreadPool` mock class expects the various thread count props to be initialized to the defaults. So I am removing the static overrides.
--
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
[GitHub] [kafka] splett2 commented on pull request #13655: MINOR: Reduce number of threads created for integration test brokers
Posted by "splett2 (via GitHub)" <gi...@apache.org>.
splett2 commented on PR #13655:
URL: https://github.com/apache/kafka/pull/13655#issuecomment-1531539359
@showuon
not explicitly. I was hoping it would reduce some of the CI job resource utilization.
--
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
[GitHub] [kafka] splett2 commented on a diff in pull request #13655: MINOR: Reduce number of threads created for integration test brokers
Posted by "splett2 (via GitHub)" <gi...@apache.org>.
splett2 commented on code in PR #13655:
URL: https://github.com/apache/kafka/pull/13655#discussion_r1182012620
##########
clients/src/test/java/org/apache/kafka/test/TestUtils.java:
##########
@@ -150,17 +150,6 @@ public static String randomString(final int len) {
public static File tempFile(final String prefix, final String suffix) throws IOException {
final File file = Files.createTempFile(prefix, suffix).toFile();
file.deleteOnExit();
-
- // Note that we don't use Exit.addShutdownHook here because it allows for the possibility of accidently
- // overriding the behaviour of this hook leading to leaked files.
- Runtime.getRuntime().addShutdownHook(KafkaThread.nonDaemon("delete-temp-file-shutdown-hook", () -> {
- try {
- Utils.delete(file);
- } catch (IOException e) {
- log.error("Error deleting {}", file.getAbsolutePath(), e);
- }
- }));
Review Comment:
For temp files this extra thread does not seem necessary. `file.deleteOnExit` already registers a shutdown hook.
--
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
[GitHub] [kafka] jolshan commented on a diff in pull request #13655: MINOR: Reduce number of threads created for integration test brokers
Posted by "jolshan (via GitHub)" <gi...@apache.org>.
jolshan commented on code in PR #13655:
URL: https://github.com/apache/kafka/pull/13655#discussion_r1183001927
##########
core/src/test/scala/unit/kafka/server/DynamicBrokerConfigTest.scala:
##########
@@ -609,7 +609,10 @@ class DynamicBrokerConfigTest {
val zkClient: KafkaZkClient = mock(classOf[KafkaZkClient])
when(zkClient.getEntityConfigs(anyString(), anyString())).thenReturn(new java.util.Properties())
- val oldConfig = KafkaConfig.fromProps(TestUtils.createBrokerConfig(0, TestUtils.MockZkConnect, port = 9092))
+ val initialProps = TestUtils.createBrokerConfig(0, TestUtils.MockZkConnect, port = 9092)
Review Comment:
Can you explain this change?
--
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
[GitHub] [kafka] splett2 commented on pull request #13655: MINOR: Reduce number of threads created for integration test brokers
Posted by "splett2 (via GitHub)" <gi...@apache.org>.
splett2 commented on PR #13655:
URL: https://github.com/apache/kafka/pull/13655#issuecomment-1532309913
@jolshan
I am investigating
```
[kafka.api.SslAdminIntegrationTest.testAsynchronousAuthorizerAclUpdatesDontBlockRequestThreads()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-13655/4/testReport/junit/kafka.api/SslAdminIntegrationTest/Build___JDK_11_and_Scala_2_13___testAsynchronousAuthorizerAclUpdatesDontBlockRequestThreads__/)
```
I will revert the IO threads thing for now until I investigate further.
--
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
[GitHub] [kafka] splett2 commented on pull request #13655: MINOR: Reduce number of threads created for integration test brokers
Posted by "splett2 (via GitHub)" <gi...@apache.org>.
splett2 commented on PR #13655:
URL: https://github.com/apache/kafka/pull/13655#issuecomment-1532073691
Test failures were:
--
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