You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "showuon (via GitHub)" <gi...@apache.org> on 2024/01/04 08:25:17 UTC

[PR] KAFKA-16079: fix threads leak threads in LocalLeaderEndPointTest and other tests [kafka]

showuon opened a new pull request, #15122:
URL: https://github.com/apache/kafka/pull/15122

   Fix threads leak in LocalLeaderEndPointTest/FinalizedFeatureChangeListenerTest/KafkaApisTest/ReplicaManagerConcurrencyTest
   
   ### 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


Re: [PR] KAFKA-16079: fix threads leak threads in LocalLeaderEndPointTest and other tests [kafka]

Posted by "showuon (via GitHub)" <gi...@apache.org>.
showuon commented on PR #15122:
URL: https://github.com/apache/kafka/pull/15122#issuecomment-1877995119

   Failed tests are unrelated.


-- 
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-16079: fix threads leak threads in LocalLeaderEndPointTest and other tests [kafka]

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


##########
core/src/test/scala/unit/kafka/server/ReplicaManagerConcurrencyTest.scala:
##########
@@ -50,12 +51,15 @@ import scala.collection.{immutable, mutable}
 import scala.jdk.CollectionConverters._
 import scala.util.Random
 
-class ReplicaManagerConcurrencyTest {
+class ReplicaManagerConcurrencyTest extends Logging {
 
   private val time = new MockTime()

Review Comment:
   Nice! Updated.



-- 
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-16079: fix threads leak threads in LocalLeaderEndPointTest and other tests [kafka]

Posted by "showuon (via GitHub)" <gi...@apache.org>.
showuon commented on PR #15122:
URL: https://github.com/apache/kafka/pull/15122#issuecomment-1876696104

   @divijvaidya , call for review.


-- 
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-16079: fix threads leak threads in LocalLeaderEndPointTest and other tests [kafka]

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


##########
core/src/test/scala/unit/kafka/server/KafkaApisTest.scala:
##########
@@ -1388,20 +1388,23 @@ class KafkaApisTest extends Logging {
       topics.foreach(topic => {
         val metadataRequestData = new MetadataRequestData().setTopics(Collections.singletonList(topic))
         val request = buildRequest(new MetadataRequest(metadataRequestData, version.toShort))
-        kafkaApis = createKafkaApis()

Review Comment:
   This `kafkaApis` will be created multiple times in this test, so we have to close them 1 by 1 inside 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-16079: fix threads leak threads in LocalLeaderEndPointTest and other tests [kafka]

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


##########
core/src/test/scala/unit/kafka/server/ReplicaManagerConcurrencyTest.scala:
##########
@@ -50,12 +51,15 @@ import scala.collection.{immutable, mutable}
 import scala.jdk.CollectionConverters._
 import scala.util.Random
 
-class ReplicaManagerConcurrencyTest {
+class ReplicaManagerConcurrencyTest extends Logging {
 
   private val time = new MockTime()

Review Comment:
   should we close time.scheduler.close() 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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-16079: fix threads leak threads in LocalLeaderEndPointTest and other tests [kafka]

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


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