-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Deprecate AbstractConnectionPool "callback" methods #5857
Comments
This issue has been automatically marked as stale because it has been a |
This issue has been automatically marked as stale because it has been a |
This issue has been automatically marked as stale because it has been a |
Deprecated idle(), acquired(), released() for removal. Renamed removed(), now deprecated, to onRemoved() to match with onCreated(). Kept onCreated() and onRemoved() as they are the only methods that are not racy. Signed-off-by: Simone Bordet <[email protected]>
…11542) Deprecated idle(), acquired(), released() for removal. Renamed removed(), now deprecated, to onRemoved() to match with onCreated(). Kept onCreated() and onRemoved() as they are the only methods that are not racy. Signed-off-by: Simone Bordet <[email protected]>
Jetty version
9.4.x
Description
AbstractConnectionPool
has the following "callback" methods:onCreated(Connection)
idle(Connection, boolean)
acquired(Connection)
released(Connection)
removed(Connection)
They were introduced as "callbacks" for subclasses to override, but since they are called "after the fact", the
Connection
status maybe already changed.For example, when
idle(Connection, boolean) is called, the
Connection` may already be used by some other thread N times or already be closed.Furthermore, ordering is not guaranteed so, it is possible for example that
released(Connection)
is called beforeacquired(Connection)
.Primary user of these "callbacks" is
LeakTrackingConnectionPool
, but due to the problems above it's not that reliable.This has also been reported in #2814 and also in #4949.
The text was updated successfully, but these errors were encountered: