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

Honor pool connection timeout when executing queries directly in the pool #1338

Open
wants to merge 8 commits into
base: 4.x
Choose a base branch
from

Conversation

pablosaavedra-rappi
Copy link

Should fix #1232, as it now uses the timeout when acquiring the connection

Motivation:

We've been bugged by #1232 for some time and the fix keeps getting pushed.

@pablosaavedra-rappi pablosaavedra-rappi marked this pull request as draft July 11, 2023 23:27
@vietj vietj self-requested a review October 10, 2023 08:41
Copy link
Member

@vietj vietj left a comment

Choose a reason for hiding this comment

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

I think the change is good but will impact pooled clients for which the promise is to schedule commands without waiting for a connection to be free, so we should have this behaviour configurable and disabled when producing a pooled client. See PgBuilder#client() vs PgBuilder#pool()

@pablosaavedra-rappi
Copy link
Author

Thanks for the comment, will look into it and update the PR.

…pool.

Should fix eclipse-vertx#1232, as it now uses the timeout when acquiring the connection
- Found a pool test I could modify (but couldn't validate locally yet)
- Changed the code to return the release the connection, which wasn't happening
…ile still ignoring timeout for legacy clients
@pablosaavedra-rappi pablosaavedra-rappi marked this pull request as ready for review May 6, 2024 17:44
@pablosaavedra-rappi
Copy link
Author

@vietj finally got around to working on this one. I rebased with the 4.x branch and added the changes you requested. Let me know if you have any other comment.

Thanks.

@pablosaavedra-rappi
Copy link
Author

pablosaavedra-rappi commented May 6, 2024

One question, tho: I see that the src/main/generated folder is checked into version control. Should I push the class that changed there, too?

@vietj
Copy link
Member

vietj commented May 6, 2024

@pablosaavedra-rappi yes you can push generated source code

@vietj vietj added this to the 4.5.8 milestone May 14, 2024
@vietj
Copy link
Member

vietj commented May 16, 2024

Looking at this again, I am not a fan of the option as is, I think instead command should have their own timeout to explicitely named the feature, and we should call it scheduleTimeout which is the timeout to schedule a command, if a connection has not been made available within that timeout then the command cannot be scheduled and is failed

@vietj
Copy link
Member

vietj commented May 16, 2024

@pablosaavedra-rappi

@pablosaavedra-rappi
Copy link
Author

So @vietj you are suggesting we overload the method with an additional scheduleTimeout parameter and the behavior there? I can check how that'd look and update the PR.

@vietj
Copy link
Member

vietj commented May 18, 2024 via email

@vietj vietj modified the milestones: 4.5.8, 4.5.9 May 24, 2024
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