Skip to content
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

FbConnection.ClearPool (cnn) doesn't work [DNET568] #185

Closed
firebird-automations opened this issue Sep 23, 2014 · 3 comments
Closed

FbConnection.ClearPool (cnn) doesn't work [DNET568] #185

firebird-automations opened this issue Sep 23, 2014 · 3 comments

Comments

@firebird-automations
Copy link

Submitted by: Fernando Nájera (fernandonajera)

Is duplicated by DNET575

I think there's an error in the implementation of FbConnection.ClearPool(cnn).

It is currently implemented as FbConnectionPoolManager.Instance.ClearPool(connection.ConnectionString);

I think it should be FbConnectionPoolManager.Instance.ClearPool(connection.options.NormalizedConnectionString);

FbConnectionPoolManager keeps internally a dictionary based on normalized cnn strings, and if you pass just the cnn string, it won't find the corresponding pool, and the call to ClearPool() will be basically a NOP.

The workaround is to call ClearAllPools() instead, but that does clean more than requested/needed.

@firebird-automations
Copy link
Author

Modified by: Fernando Nájera (fernandonajera)

description: I think there's an error in the implementation of FbConnection.ClearPool(cnn).

It is currently implemented as FbConnectionPoolManager.Instance.ClearPool(connection.ConnectionString);

I think it should be FbConnectionPoolManager.Instance.ClearPool(connection.NormalizedConnectionString);

FbConnectionPoolManager keeps internally a dictionary based on normalized cnn strings, and if you pass just the cnn string, it won't find the corresponding pool, and the call to ClearPool() will be basically a NOP.

The workaround is to call ClearAllPools() instead, but that does clean more than requested/needed.

=>

I think there's an error in the implementation of FbConnection.ClearPool(cnn).

It is currently implemented as FbConnectionPoolManager.Instance.ClearPool(connection.ConnectionString);

I think it should be FbConnectionPoolManager.Instance.ClearPool(connection.options.NormalizedConnectionString);

FbConnectionPoolManager keeps internally a dictionary based on normalized cnn strings, and if you pass just the cnn string, it won't find the corresponding pool, and the call to ClearPool() will be basically a NOP.

The workaround is to call ClearAllPools() instead, but that does clean more than requested/needed.

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => Closed [ 6 ]

resolution: Duplicate [ 3 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Link: This issue is duplicated by DNET575 [ DNET575 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants