You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "divijvaidya (via GitHub)" <gi...@apache.org> on 2023/12/29 14:06:15 UTC
[PR] KAFKA-16059: Fix thread leak KafkaAPIsTest [kafka]
divijvaidya opened a new pull request, #15093:
URL: https://github.com/apache/kafka/pull/15093
KafkaApisTest creates instance of `KafkaApis.scala` which created reaper threads for purgatory but we never call close and hence, these threads are leaked.
This PR closes the instance of KafkaApis in `@AfterEach`.
This leak is similar to the one detected in https://github.com/apache/kafka/pull/15084
--
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-16059: Fix thread leak KafkaAPIsTest [kafka]
Posted by "showuon (via GitHub)" <gi...@apache.org>.
showuon commented on code in PR #15093:
URL: https://github.com/apache/kafka/pull/15093#discussion_r1439274938
##########
core/src/test/scala/unit/kafka/server/KafkaApisTest.scala:
##########
@@ -2410,8 +2413,8 @@ class KafkaApisTest {
responseCallback.capture(),
ArgumentMatchers.eq(requestLocal)
)).thenAnswer(_ => responseCallback.getValue.apply(Errors.PRODUCER_FENCED))
-
- createKafkaApis().handleEndTxnRequest(request, requestLocal)
+ kafkaApis = createKafkaApis()
+ kafkaApis.handleEndTxnRequest(request, requestLocal)
Review Comment:
here, and some places below.
##########
core/src/test/scala/unit/kafka/server/KafkaApisTest.scala:
##########
@@ -2055,8 +2058,8 @@ class KafkaApisTest {
responseCallback.capture(),
ArgumentMatchers.eq(requestLocal)
)).thenAnswer(_ => responseCallback.getValue.apply(InitProducerIdResult(producerId, epoch, Errors.PRODUCER_FENCED)))
-
- createKafkaApis().handleInitProducerIdRequest(request, requestLocal)
+ kafkaApis = createKafkaApis()
+ kafkaApis.handleInitProducerIdRequest(request, requestLocal)
Review Comment:
Does the intent correct?
##########
core/src/test/scala/unit/kafka/server/KafkaApisTest.scala:
##########
@@ -2167,8 +2170,8 @@ class KafkaApisTest {
responseCallback.capture(),
ArgumentMatchers.eq(requestLocal)
)).thenAnswer(_ => responseCallback.getValue.apply(Errors.PRODUCER_FENCED))
-
- createKafkaApis().handleAddPartitionsToTxnRequest(request, requestLocal)
+ kafkaApis = createKafkaApis()
+ kafkaApis.handleAddPartitionsToTxnRequest(request, requestLocal)
Review Comment:
ditto
##########
core/src/test/scala/unit/kafka/server/KafkaApisTest.scala:
##########
@@ -2113,8 +2116,8 @@ class KafkaApisTest {
responseCallback.capture(),
ArgumentMatchers.eq(requestLocal)
)).thenAnswer(_ => responseCallback.getValue.apply(Errors.PRODUCER_FENCED))
-
- createKafkaApis().handleAddOffsetsToTxnRequest(request, requestLocal)
+ kafkaApis = createKafkaApis()
+ kafkaApis.handleAddOffsetsToTxnRequest(request, requestLocal)
Review Comment:
ditto.
--
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-16059: Fix thread leak KafkaAPIsTest [kafka]
Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya merged PR #15093:
URL: https://github.com/apache/kafka/pull/15093
--
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-16059: Fix thread leak KafkaAPIsTest [kafka]
Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya commented on PR #15093:
URL: https://github.com/apache/kafka/pull/15093#issuecomment-1873868215
Thank you for the review @showuon. I believe I have fixed all indentation problems now.
--
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-16059: Fix thread leak KafkaAPIsTest [kafka]
Posted by "jolshan (via GitHub)" <gi...@apache.org>.
jolshan commented on PR #15093:
URL: https://github.com/apache/kafka/pull/15093#issuecomment-1874304438
Thanks folks for fixing this stuff :)
--
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-16059: Fix thread leak KafkaAPIsTest [kafka]
Posted by "showuon (via GitHub)" <gi...@apache.org>.
showuon commented on code in PR #15093:
URL: https://github.com/apache/kafka/pull/15093#discussion_r1439274094
##########
core/src/test/scala/unit/kafka/server/KafkaApisTest.scala:
##########
@@ -2055,8 +2058,8 @@ class KafkaApisTest {
responseCallback.capture(),
ArgumentMatchers.eq(requestLocal)
)).thenAnswer(_ => responseCallback.getValue.apply(InitProducerIdResult(producerId, epoch, Errors.PRODUCER_FENCED)))
-
- createKafkaApis().handleInitProducerIdRequest(request, requestLocal)
+ kafkaApis = createKafkaApis()
+ kafkaApis.handleInitProducerIdRequest(request, requestLocal)
Review Comment:
Is the indent correct?
--
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-16059: Fix thread leak KafkaAPIsTest [kafka]
Posted by "showuon (via GitHub)" <gi...@apache.org>.
showuon commented on code in PR #15093:
URL: https://github.com/apache/kafka/pull/15093#discussion_r1439274094
##########
core/src/test/scala/unit/kafka/server/KafkaApisTest.scala:
##########
@@ -2055,8 +2058,8 @@ class KafkaApisTest {
responseCallback.capture(),
ArgumentMatchers.eq(requestLocal)
)).thenAnswer(_ => responseCallback.getValue.apply(InitProducerIdResult(producerId, epoch, Errors.PRODUCER_FENCED)))
-
- createKafkaApis().handleInitProducerIdRequest(request, requestLocal)
+ kafkaApis = createKafkaApis()
+ kafkaApis.handleInitProducerIdRequest(request, requestLocal)
Review Comment:
Does the indent correct?
--
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-16059: Fix thread leak KafkaAPIsTest [kafka]
Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya commented on PR #15093:
URL: https://github.com/apache/kafka/pull/15093#issuecomment-1872116408
@showuon @jolshan please review when you get a chance
--
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-16059: Fix thread leak KafkaAPIsTest [kafka]
Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya commented on PR #15093:
URL: https://github.com/apache/kafka/pull/15093#issuecomment-1874131838
The test changed in this PR is successful - https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-15093/3/testReport/kafka.server/ControllerApisTest/
--
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