-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Transaction] Add transaction perf #11933
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we reuse the existing perf components? Such as PerformanceClient
, PerformanceProducer
and PerformanceConsumer
.
Their logic is different, and they did not extract the generic component. I don't think it's suitable |
@liangyepianzhou Thanks for your contribution. Please do not forget to add docs accordingly to allow users to know your great code changes. And you can ping me to review the docs, thanks. |
Can we divide produce and consume in separate file? Users can test produce with transaction and consume with transaction individually. Otherwise, we may add a script in bin/pulsar-perf to start the transaction perf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very interesting idea.
We need this kind of tools in order to be able to test transactions properly.
This is a brand new tool, can you please start a discussion on dev@pulsar.apache.org ?
this way we can discuss in the community
/pulsarbot run-failure-checks |
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceTransaction.java
Outdated
Show resolved
Hide resolved
@Parameter(names = {"--txn-disEnable"}, description = "Disable transaction") | ||
public boolean isDisEnableTransaction = false; | ||
|
||
@Parameter(names = {"-abort"}, description = "Abort the transaction. (After --txn-disEnable " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why some arguments have a double "-" and some other arguments have a single "-" ?
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceTransaction.java
Outdated
Show resolved
Hide resolved
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceTransaction.java
Show resolved
Hide resolved
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceTransaction.java
Outdated
Show resolved
Hide resolved
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceTransaction.java
Outdated
Show resolved
Hide resolved
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/utils/PerformanceUtils.java
Outdated
Show resolved
Hide resolved
I am moving this PR to 2.10.0 I believe that it is not useful to add this to 2.8 branch as transactions evolved |
@eolivelli please review again, thanks. |
/pulsarbot run-failure-checks |
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceConsumer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
let's go with this first version of the tool
Master Issue: #apache#11765 ### Motivation - When opening a transaction, what is the delay and rate of pulsar sending and consuming messages? - How does the granularity of the transaction affect the rate at which pulsar produces or consumes messages - Is the rate of abort and commit transactions different - Try to keep the functions of ordinary produce perfand consume perf as much as possible ### Modifications Add PerformanceTransaction.Class - According to the number of topics set by the user, each topic starts a thread to execute a number of transactions asynchronously. - If there is a preset transaction value, the production or consumption of this topic is terminated after the corresponding number of transactions is executed, and the production and consumption of all topics are summed up. After the consumption ends, the main thread ends. - Each consumer can have multiple subscriptions, but each subscription has only one consumer. In order to better compare the rate of production and consumption.
Master Issue: #apache#11765 ### Motivation - When opening a transaction, what is the delay and rate of pulsar sending and consuming messages? - How does the granularity of the transaction affect the rate at which pulsar produces or consumes messages - Is the rate of abort and commit transactions different - Try to keep the functions of ordinary produce perfand consume perf as much as possible ### Modifications Add PerformanceTransaction.Class - According to the number of topics set by the user, each topic starts a thread to execute a number of transactions asynchronously. - If there is a preset transaction value, the production or consumption of this topic is terminated after the corresponding number of transactions is executed, and the production and consumption of all topics are summed up. After the consumption ends, the main thread ends. - Each consumer can have multiple subscriptions, but each subscription has only one consumer. In order to better compare the rate of production and consumption.
Master Issue: #apache#11765 ### Motivation - When opening a transaction, what is the delay and rate of pulsar sending and consuming messages? - How does the granularity of the transaction affect the rate at which pulsar produces or consumes messages - Is the rate of abort and commit transactions different - Try to keep the functions of ordinary produce perfand consume perf as much as possible ### Modifications Add PerformanceTransaction.Class - According to the number of topics set by the user, each topic starts a thread to execute a number of transactions asynchronously. - If there is a preset transaction value, the production or consumption of this topic is terminated after the corresponding number of transactions is executed, and the production and consumption of all topics are summed up. After the consumption ends, the main thread ends. - Each consumer can have multiple subscriptions, but each subscription has only one consumer. In order to better compare the rate of production and consumption.
Master Issue: ##11765 ### Motivation - When opening a transaction, what is the delay and rate of pulsar sending and consuming messages? - How does the granularity of the transaction affect the rate at which pulsar produces or consumes messages - Is the rate of abort and commit transactions different - Try to keep the functions of ordinary produce perfand consume perf as much as possible ### Modifications Add PerformanceTransaction.Class - According to the number of topics set by the user, each topic starts a thread to execute a number of transactions asynchronously. - If there is a preset transaction value, the production or consumption of this topic is terminated after the corresponding number of transactions is executed, and the production and consumption of all topics are summed up. After the consumption ends, the main thread ends. - Each consumer can have multiple subscriptions, but each subscription has only one consumer. In order to better compare the rate of production and consumption. (cherry picked from commit 793a8b9)
this PR introduced a flaky test, reported as #14109 . Please fix |
Master Issue: ##11765
Motivation
Modifications
Add PerformanceTransaction.Class
Verifying this change
Not yet
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?
doc-required
(If you need help on updating docs, create a doc issue)
no-need-doc
(Please explain why)
doc
(If this PR contains doc changes)