-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Fixing high CPU and memory leak in session pump #5493
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
…ccept session requests.
… creation timeout.
|
Add Hemant to the PR since he is looking at service bus track 2 |
|
guys, this is an urgent fix we need to rollout. Please review it asap. I will push for the merge by end of today. |
|
|
||
| this.timedOutUpdateStateRequestsDaemon = () -> { | ||
| try { | ||
| if (CoreMessageReceiver.this.getIsClosed()) |
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.
| if (CoreMessageReceiver.this.getIsClosed()) | |
| if (CoreMessageReceiver.this.getIsClosed()) { | |
| ``` #Resolved |
| // CONTRACT: message should be delivered to the caller of MessageReceiver.receive() only from prefetched messages | ||
| this.returnMesagesLoopDaemon = () -> { | ||
| try { | ||
| if (CoreMessageReceiver.this.getIsClosed()) |
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.
| if (CoreMessageReceiver.this.getIsClosed()) | |
| if (CoreMessageReceiver.this.getIsClosed()) { | |
| ``` #Resolved |
|
Just a few nit. LGTM |
|
/azp run java - servicebus - ci |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Session pump keeps trying to accept sessions and if a session is not available on the service, link creation will timeout. CoreMessageReceiver object is created, and then discarded as link creation fails. But the scheduled timer objects that are created in the constructor are not cancelled and after some time, there will too many timers taking CPU cycles and holding reference to CoreMessageRecevier objects preventing them from being garbage collected.