-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fixed netty leak on DELETE operations in GATEWAY mode #14727
Fixed netty leak on DELETE operations in GATEWAY mode #14727
Conversation
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
Thoughts on covering some of these aspects through UT? |
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.
we discussed offline this yesterday.
LGTM.
Sure, will come up with a way to make sure the body of Reactor Netty response is always subscribed. |
byteBuf.retain(); | ||
return byteBuf; | ||
}); | ||
.doOnSubscribe(this::updateSubscriptionState); |
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.
what this change for ?
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.
Just removed the unnecessary map
operator. We don't need to retain the byteBuf here, as it is not released afterwards.
This can potentially raise IllegalReferenceCount issue with netty.
Although, we don't use this API, which is why no one has seen this issue.
/check-enforcer override |
Here are findings on how the leak was detected and fixed - using netty debug level logs.
BEFORE FIX: Subscribe operation is not happening on DELETE calls in Gateway mode.
AFTER FIX: Subscribe operation is happening on DELETE operations in Gateway mode.