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

Introduce a timeout notion JUST for the pending acquire case #34

Closed
simonbasle opened this issue Apr 17, 2019 · 3 comments
Closed

Introduce a timeout notion JUST for the pending acquire case #34

simonbasle opened this issue Apr 17, 2019 · 3 comments
Milestone

Comments

@simonbasle
Copy link
Member

Calling Pool#acquire().timeout() (the vanilla timeout operator) introduces a timeout that can effectively trigger in two cases:

  • the pool is depleted and cannot allocate more resources: timeout on pending acquire (time waiting for a resource to be released)
  • the pool is depleted BUT can allocate new resources: timeout on the allocation of one new resource

It appear that in some cases, the resource allocation can take some more or less arbitrary time that we are ok waiting for if we now we'll end up with a resource, but we don't want to wait more than necessary if we know we can't allocate more resources.

i.e. we want a timeout on the pending case only.

@simonbasle
Copy link
Member Author

simonbasle commented Apr 17, 2019

to be ascertained:

  • A. should the timeout be configured in the acquire call (ie overload acquire(Duration)) or in the pool configuration?

@violetagg
Copy link
Member

@simonbasle Currently in Reactor Netty we have this setting only on the connection pool, you are not able to change this for a particular acquire operation.

@simonbasle
Copy link
Member Author

as discussed off-band, we'll keep the acquire(Duration) overload only. global configurations can be put in place easily enough in downstream libraries.

@simonbasle simonbasle added this to the 0.0.1.M1 milestone May 9, 2019
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

No branches or pull requests

2 participants