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
Allow configurable connection provider eviction predicate #2557
Conversation
reactor-netty-core/src/main/java/reactor/netty/resources/ConnectionProvider.java
Outdated
Show resolved
Hide resolved
dfbacd2
to
d50c9d0
Compare
reactor-netty-core/src/main/java/reactor/netty/resources/PooledConnectionProvider.java
Outdated
Show resolved
Hide resolved
68dfe0b
to
3851363
Compare
d307ad6
to
ab4d4ac
Compare
@samueldlightfoot I'll check this in the next days |
@samueldlightfoot For HTTP/1.1 you ignore the default eviction predicate and max idle/life time, but for HTTP/2 you keep them. Why do you introduce this difference? |
I'll get this fixed over the weekend |
@violetagg Do we want to keep separate checks for idle and max lifetime or can we integrate into the eviction predicate like SimpleDequePool? I have currently integrated max lifetime and idle time into the eviction predicate, but I just saw the Javadoc in the Class header saying we cannot use the eviction predicate from config due to more complexity. I think we should be fine to use the evictionPredicate but just with the constraint that active streams must also be 0 if the connection is open. Let me know what you think. |
b9b8826
to
f1a1ea8
Compare
@samueldlightfoot Is this ready for a review? |
Yes please |
f1a1ea8
to
ead20b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice PR! Thanks!
I have just two small things which are not related to the functionality.
reactor-netty-core/src/main/java/reactor/netty/resources/ConnectionProvider.java
Outdated
Show resolved
Hide resolved
reactor-netty-http/src/test/java/reactor/netty/http/client/Http2PoolTest.java
Outdated
Show resolved
Hide resolved
Committed both changes - thanks for the review. :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@reactor/netty-team PTAL
reactor-netty-http/src/main/java/reactor/netty/http/client/Http2Pool.java
Outdated
Show resolved
Hide resolved
f5689e4
to
6457f4b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@samueldlightfoot I merged this in |
Add support for a custom eviction predicate in the ConnectionProvider.