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
FixedChannelPool does not count acquired channels precisely #3988
Comments
@fratboy - Thanks for reporting! @normanmaurer - Assigned to you for now. |
@fratboy thanks... fix in the works. |
@normanmaurer My pleasure. |
Motivation: We missed to correctly count acquired channels in FixedChannelPool which could produce an assert error. Modifications: Only try to decrement acquired count if the channel was really acuired. Result: No more assert error possible.
@normanmaurer It's exactly same with my patch in my project. It works perfect. |
Motivation: We missed to correctly count acquired channels in FixedChannelPool which could produce an assert error. Modifications: Only try to decrement acquired count if the channel was really acuired. Result: No more assert error possible.
Motivation: We missed to correctly count acquired channels in FixedChannelPool which could produce an assert error. Modifications: Only try to decrement acquired count if the channel was really acuired. Result: No more assert error possible.
Motivation: We missed to correctly count acquired channels in FixedChannelPool which could produce an assert error. Modifications: Only try to decrement acquired count if the channel was really acuired. Result: No more assert error possible.
@fratboy - Thanks for the report and verification! |
Why |
@wyzssw because everything is done from the same Thread (EventLoop) |
@normanmaurer I get it, thanks |
Motivation: We missed to correctly count acquired channels in FixedChannelPool which could produce an assert error. Modifications: Only try to decrement acquired count if the channel was really acuired. Result: No more assert error possible.
Netty version: 4.0.10.Beta5
Context:
When queued
AcquireTask
fails,decrementAndRunTaskQueue()
method could throw assertion error.Steps to reproduct:
FixedChannelPool.acquire
enough to make someAcquireTask
s be queued.AcquireTask
fail.Opinion:
acquired
inAcquireListener
and set it true when it is dequed frompendingAcquireQueue
.acquired
flag is true calldecrementAndRunTaskQueue()
else callrunTaskQueue()
The text was updated successfully, but these errors were encountered: