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
Artemis 1902 #2119
Artemis 1902 #2119
Conversation
@mtaylor I know I have in the past asked to separate test and fix.. but I went back on that.. as it's easier to cherry-pick.. and the gitreport would make a better correlation. You ok if we squash fix and test together on a single commit? |
@@ -107,7 +108,11 @@ public void incrementConsumers() { | |||
} | |||
|
|||
public void decrementConsumers() { | |||
numberOfConsumers--; | |||
if (numberOfConsumers > 0) { |
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 isnt being atomically updated so still possible two decrements at the same time can cause the number to go negative incorrectly.
To avoid this ideally should syncronize any update to the field or make changes to the field using an atomic updater , im more pro the atomic updater
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.
@michaelandrepearce +1. I will make this an AtomicInteger cheers.
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.
The atomic updater would be better then atomic integer. I think that’s what Michael is referring.
@clebertsuconic Feel free to squash the commits once I've updated with @michaelandrepearce feedback. I don't really care. However, cherry-picking should be straight forward, since both commits have the JIRA, and this PR with the commits is also posted in the JIRA. |
The git release report makes it easier to correlate code added versus test added. |
Calling close multiple times on ServerConsumer can result in multiple notifications being routed around the cluster. This causes cluster topology info to become skewed. Which affects a number of components such as message redistribution, metrics and can eventually cause OOM should multiple queues be redistributing at the same time.
No description provided.