-
Notifications
You must be signed in to change notification settings - Fork 962
Fix the queue size in writeThreadPool exceeds the configured size #3348
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
Conversation
|
/pulsarbot run-failure-checks |
2 similar comments
|
/pulsarbot run-failure-checks |
|
/pulsarbot run-failure-checks |
|
rerun failure checks |
5 similar comments
|
rerun failure checks |
|
rerun failure checks |
|
rerun failure checks |
|
rerun failure checks |
|
rerun failure checks |
|
@hangc0276 @eolivelli PTAL,thanks! |
|
@shoothzj PTAL,thanks! |
merlimat
left a comment
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.
This change will cause an incredible amount of mutex contention and big performance regression.
Do you have any good idea about the queue size exceeding the configured size? At present, the queue size we configured cannot control the queue size in high concurrency scenarios. @merlimat |
@merlimat OK, I will try some other solutions. |
| public void execute(Runnable command) { | ||
| this.checkQueue(1); | ||
| super.execute(command); | ||
| synchronized (this) { |
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.
a style note..... you can push synchronized to the method signature
|
@lordcheng10 +1 to Matteo's concern about performance. |
hangc0276
left a comment
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.
+1 to Matteo's concern about performance.
Motivation
Fix the queue size in writeThreadPool exceeds the configured size.
I print out the queue size every time I submit a task, and then set the queue size to 1:
maxPendingAddRequestsPerThread=1
The queue size of the log output is greater than 1:
It means that the queue size set by maxPendingAddRequestsPerThread does not limit the queue size.