Skip to content

[Good First Issue] Add Support for Specifying Topic Prefix for Catch-up Reading in Performance Test #2373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Chillax-0v0 opened this issue Mar 18, 2025 · 7 comments · May be fixed by #2401
Assignees
Labels
good first issue Good for newcomers

Comments

@Chillax-0v0
Copy link
Contributor

Background

AutoMQ provides the automq-perf-test.sh script to test performance under different scenarios. Currently, it supports testing "catch-up read" (cold read) scenarios by:

  1. Sending a batch of messages.
  2. Delaying consumption until messages have accumulated for a specified period.
  3. Observing consumption throughput and its impact on producers.

But currently, each test requires spending significant time to accumulate messages, which slows down the test.

Goal

Save testing time by allowing users to pre-specify topics or topic groups (via a prefix) for catch-up read testing.

Required Changes

  1. Add a parameter (e.g., --catchup-topic-prefix) to specify a topic prefix for catch-up read testing.
  2. If the prefix is provided, reuse existing topics matching the prefix instead of creating new ones.
  3. Ensure the script skips the message accumulation phase when using existing topics.
@Chillax-0v0 Chillax-0v0 added the good first issue Good for newcomers label Mar 18, 2025
@Captain-Slacker-OwO
Copy link

/assign

@Captain-Slacker-OwO
Copy link

Hello, I have a few questions in the process of implementing this issue, and I hope to get answers. Regarding your optimization requirement: "By adding the -catchup-topic-prefix prefix, the script can reuse the existing topic", I found that the perfcommend class is the actual test tool. Do I need to modify the code of this class to verify the "-catchup-topic-prefix" prefix parameter, or can I meet the requirement by simply modifying the logic of automq-perf-test.sh?

@Chillax-0v0
Copy link
Contributor Author

Hello, I have a few questions in the process of implementing this issue, and I hope to get answers. Regarding your optimization requirement: "By adding the -catchup-topic-prefix prefix, the script can reuse the existing topic", I found that the perfcommend class is the actual test tool. Do I need to modify the code of this class to verify the "-catchup-topic-prefix" prefix parameter, or can I meet the requirement by simply modifying the logic of automq-perf-test.sh?

Hello, @xiayu1118, the automq-perf-test.sh script primarily serves as an entry point that ultimately executes the org.apache.kafka.tools.automq.PerfCommand#main method. To implement this feature, you will need to modify the relevant Java code rather than just the shell script logic.

Specifically, you should add the new command-line option (e.g., --catchup-topic-prefix) in the org.apache.kafka.tools.automq.perf.PerfConfig class to parse and validate the parameter. Then, implement the corresponding logic in the org.apache.kafka.tools.automq.PerfCommand and org.apache.kafka.tools.automq.perf.ConsumerService class to handle topic reuse based on the prefix.

Feel free to reach out if you need further clarification or assistance during implementation!

@Captain-Slacker-OwO
Copy link

Hello, I have a few questions in the process of implementing this issue, and I hope to get answers. Regarding your optimization requirement: "By adding the -catchup-topic-prefix prefix, the script can reuse the existing topic", I found that the perfcommend class is the actual test tool. Do I need to modify the code of this class to verify the "-catchup-topic-prefix" prefix parameter, or can I meet the requirement by simply modifying the logic of automq-perf-test.sh?

Hello, @xiayu1118, the automq-perf-test.sh script primarily serves as an entry point that ultimately executes the org.apache.kafka.tools.automq.PerfCommand#main method. To implement this feature, you will need to modify the relevant Java code rather than just the shell script logic.

Specifically, you should add the new command-line option (e.g., --catchup-topic-prefix) in the org.apache.kafka.tools.automq.perf.PerfConfig class to parse and validate the parameter. Then, implement the corresponding logic in the org.apache.kafka.tools.automq.PerfCommand and org.apache.kafka.tools.automq.perf.ConsumerService class to handle topic reuse based on the prefix.

Feel free to reach out if you need further clarification or assistance during implementation!

Got it!

@Captain-Slacker-OwO
Copy link

Hello, I encountered a problem while trying to test my new bash script that supports reusing existing themes through prefixes: Does autoMQ currently support source code deployment? I encountered a lot of problems while compiling and packaging autoMQ, and I was wondering if I had gone in the wrong direction; Or is there a more convenient way to run test scripts?

@Captain-Slacker-OwO
Copy link

It's okay, I solved it here.

@xiangyongfang
Copy link

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
3 participants