-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Flaky-test: ConnectionPoolTest.testSetProxyToTargetBrokerAddress #20290
Comments
I saw this with #20289, but there doesn't appear to be any correlation. I cannot get it to fail locally. @nicoloboschi - this is from a test you recently added. Have you noticed any flakiness? |
the test has a problem: pulsar/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/ConnectionPoolTest.java Lines 186 to 192 in e286339
I guess that one way to fix this would be to use different loopback address. |
This issue reproduces locally with |
The change to use 127.0.0.101 and 127.0.0.102 doesn't fix the issue. This looks like a bug in the connection pool logic itself. The key in the pool should use both the logicalAddress and physicalAddress? I wonder how this could have worked in the first place? |
with |
the flakiness goes away when I make ClientCnx.close synchronous:
It seems that it doesn't make sense to close the connection since that removes the connection from the connection pool. The connection pool in Pulsar client isn't the connection pool you would expect it to be. It's not like a JDBC datasource connection pool. |
Changes to the test that make it fail consistently: lhotari@1018fb9 This seems to reproduce the bug in the connection pool. The connection pool should take the proxy target into account. |
After all, I came to the conclusion that the test was wrong. Here's the PR which contains the description and fix: #20293 |
Search before asking
Example failure
https://github.com/apache/pulsar/actions/runs/4933518332/jobs/8817664984?pr=20289#step:10:747
Exception stacktrace
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: