Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-10353

Trogdor - Fix RoundTripWorker to not fail when the topic it's trying to create already exists

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      Trogdor's RoundTripWorker calls WorkerUtils#createTopics with a failOnCreate flag equal to true, making the code throw an exception if the topic already exists.

      https://github.com/apache/kafka/blob/28b7d8e21656649fb09b09f9bacfe865b0ca133c/tools/src/main/java/org/apache/kafka/trogdor/workload/RoundTripWorker.java#L149

      This is prone to race conditions when scheduling multiple workers to start at the same time - only one will succeed in creating a topic and running the test, while the rest will end up with a fatal error

      This has also been seen to happen in the RoundTripFaultTest system test where a network exception can cause the CreateTopics request to reach Kafka but Trogdor retry it and hit a TopicAlreadyExists exception on the retry, failing the test.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              enether Stanislav Kozlovski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: