You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "chirag-wadhwa5 (via GitHub)" <gi...@apache.org> on 2025/07/16 21:26:48 UTC
[PR] KAFKA-19516: Added a request timeout of 120000ms to CreateTopics in ShareFetchAcknolwedgeRequestTest methods [kafka]
chirag-wadhwa5 opened a new pull request, #20184:
URL: https://github.com/apache/kafka/pull/20184
This PR works is an aim to resolve the flakiness in the ShareFetchAcknolwedgeRequestTest tests. Recently some flakes were seen on the test and it was reproduced locally as well, with the error -> `Caused by: org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment. Call: createTopics`. This PR tries to resolve that by adding an increased timeout of 120000ms (2 minutes) to the CreateTopics request sent out.
--
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-19516: Added a request timeout of 120000ms to CreateTopics in ShareFetchAcknolwedgeRequestTest methods [kafka]
Posted by "m1a2st (via GitHub)" <gi...@apache.org>.
m1a2st commented on code in PR #20184:
URL: https://github.com/apache/kafka/pull/20184#discussion_r2222807285
##########
core/src/test/scala/unit/kafka/server/GroupCoordinatorBaseRequestTest.scala:
##########
@@ -123,16 +123,35 @@ class GroupCoordinatorBaseRequestTest(cluster: ClusterInstance) {
topicConfig: Properties = new Properties
): Map[TopicIdPartition, Int] = {
val admin = cluster.admin()
+ var partitionToLeader: scala.collection.immutable.Map[Int, Int] = null
try {
- val partitionToLeader = TestUtils.createTopicWithAdmin(
- admin = admin,
- topic = topic,
- brokers = brokers(),
- controllers = controllerServers(),
- numPartitions = numPartitions,
- replicationFactor = replicationFactor,
- topicConfig = topicConfig
+ TestUtils.waitUntilTrue(
+ condition = () => {
+ try {
+ partitionToLeader = TestUtils.createTopicWithAdmin(
+ admin = admin,
+ topic = topic,
+ brokers = brokers(),
+ controllers = controllerServers(),
+ numPartitions = numPartitions,
+ replicationFactor = replicationFactor,
+ topicConfig = topicConfig
+ )
+ true // Success
+ } catch {
+ case _: Throwable => false // Will retry
+ }
+ },
+ msg = "Failed to create topic with admin within 2 minutes",
+ waitTimeMs = 2 * 60 * 1000, // 2 minutes in milliseconds
+ pause = 40 * 1000 // 40 seconds in milliseconds
Review Comment:
Just out of curiosity, why does the CreateTopic operation sometimes take up to 2 minutes to succeed? Is there a configuration that controls this behavior?
--
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-19516: Added a request timeout of 120000ms to CreateTopics in ShareFetchAcknolwedgeRequestTest methods [kafka]
Posted by "smjn (via GitHub)" <gi...@apache.org>.
smjn commented on code in PR #20184:
URL: https://github.com/apache/kafka/pull/20184#discussion_r2212925784
##########
core/src/test/scala/unit/kafka/server/GroupCoordinatorBaseRequestTest.scala:
##########
@@ -131,8 +132,15 @@ class GroupCoordinatorBaseRequestTest(cluster: ClusterInstance) {
controllers = controllerServers(),
Review Comment:
instead of the timeout - could we do something like waitUntilTrue?
--
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-19516: Added a request timeout of 120000ms to CreateTopics in ShareFetchAcknolwedgeRequestTest methods [kafka]
Posted by "apoorvmittal10 (via GitHub)" <gi...@apache.org>.
apoorvmittal10 commented on PR #20184:
URL: https://github.com/apache/kafka/pull/20184#issuecomment-3081572446
@chirag-wadhwa5 Can you pelase link the flaky test failure here, I cheked [here](https://develocity.apache.org/scans/tests?search.relativeStartTime=P28D&search.timeZoneId=Europe%2FLondon&tests.container=kafka.server.ShareFetchAcknowledgeRequestTest) and can see flakiness. But it's for some other reason than you mentioned.
--
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-19516: Added a request timeout of 120000ms to CreateTopics in ShareFetchAcknolwedgeRequestTest methods [kafka]
Posted by "chirag-wadhwa5 (via GitHub)" <gi...@apache.org>.
chirag-wadhwa5 closed pull request #20184: KAFKA-19516: Added a request timeout of 120000ms to CreateTopics in ShareFetchAcknolwedgeRequestTest methods
URL: https://github.com/apache/kafka/pull/20184
--
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-19516: Added a request timeout of 120000ms to CreateTopics in ShareFetchAcknolwedgeRequestTest methods [kafka]
Posted by "smjn (via GitHub)" <gi...@apache.org>.
smjn commented on code in PR #20184:
URL: https://github.com/apache/kafka/pull/20184#discussion_r2212925784
##########
core/src/test/scala/unit/kafka/server/GroupCoordinatorBaseRequestTest.scala:
##########
@@ -131,8 +132,15 @@ class GroupCoordinatorBaseRequestTest(cluster: ClusterInstance) {
controllers = controllerServers(),
Review Comment:
instead of the timeout - could we do something like waitUntilTrue? Basically I want retries instead on one long call.
--
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-19516: Added a request timeout of 120000ms to CreateTopics in ShareFetchAcknolwedgeRequestTest methods [kafka]
Posted by "chirag-wadhwa5 (via GitHub)" <gi...@apache.org>.
chirag-wadhwa5 commented on code in PR #20184:
URL: https://github.com/apache/kafka/pull/20184#discussion_r2215872893
##########
core/src/test/scala/unit/kafka/server/GroupCoordinatorBaseRequestTest.scala:
##########
@@ -131,8 +132,15 @@ class GroupCoordinatorBaseRequestTest(cluster: ClusterInstance) {
controllers = controllerServers(),
Review Comment:
Thanks for the review. I have made this change, and now the call `TestUtils.createTopicWithAdmin` is made inside a waitUntilTrue
--
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