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

Support connection pool invalidation #256

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

elsid
Copy link
Collaborator

@elsid elsid commented May 2, 2020

No description provided.

@elsid elsid changed the title Update resource_pool Support connection pool invalidation May 2, 2020
@@ -344,6 +344,13 @@ class connection_pool {
return connection_provider(*this, io);
}

/**
* Invalidate all contained connections. It will prevent all available and currently used connections to be reused.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please to add a use-case description for this function?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can think of something like: close all connections when it's considered that all of them are invalid due to some user defined heuristics but the only way to truly check it is to wait for each connection until request is timed out.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it's maybe a good point. E.g. invalidate all connections if get some wrong OID error or something like this. I mean, the feature should have a particular use case or nobody will use it. Another use case - invalidate all the connections by a signal like a log rotation.

@@ -344,6 +344,13 @@ class connection_pool {
return connection_provider(*this, io);
}

/**
* Invalidate all contained connections. It will prevent all available and currently used connections to be reused.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it's maybe a good point. E.g. invalidate all connections if get some wrong OID error or something like this. I mean, the feature should have a particular use case or nobody will use it. Another use case - invalidate all the connections by a signal like a log rotation.

@thed636 thed636 mentioned this pull request May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants