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

Reactive Postgres pipelining cannot be enabled #32822

Closed
franz1981 opened this issue Apr 21, 2023 · 16 comments · Fixed by #32821
Closed

Reactive Postgres pipelining cannot be enabled #32822

franz1981 opened this issue Apr 21, 2023 · 16 comments · Fixed by #32821
Assignees

Comments

@franz1981
Copy link
Contributor

Describe the bug

Setting pipelining level of a postgres reactive configuration is not picked it up by Vert-x while creating the connection pool.

Expected behavior

https://github.com/eclipse-vertx/vertx-sql-client/blob/a58127877a6fbb5b9ece9c58509637f699181826/vertx-pg-client/src/main/java/io/vertx/pgclient/spi/PgDriver.java#L48 requires

to allocate a PgPoolOptions options type to make the pipelining settings available while allocating the connection pool.

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@quarkus-bot
Copy link

quarkus-bot bot commented Apr 21, 2023

/cc @tsegismont (reactive-sql-clients), @vietj (reactive-sql-clients)

@geoand
Copy link
Contributor

geoand commented Apr 21, 2023

#32821 takes care of this

@quarkus-bot quarkus-bot bot added this to the 3.1 - main milestone Apr 21, 2023
@tsegismont
Copy link
Contributor

@geoand thank you for the quick fix.

I think we need additional changes:

  • users shouldn't have to create a PgPoolCreator object, setting pipelining-limit in configuration should be enough
  • Pg client is not the only one affected, MySQL and DB2 are affected too

I'm out of the office and will return on May 2. If can take care of this when I'm back.

@tsegismont tsegismont reopened this Apr 22, 2023
@tsegismont tsegismont self-assigned this Apr 22, 2023
@franz1981
Copy link
Contributor Author

Thanks @tsegismont !

@tsegismont
Copy link
Contributor

I think we need additional changes:

I gave this a second thought, we need to revert #32821

PgPoolOptions is an impl detail, it should not be exposed. It is created internally when the user wants a pooled client, not a connection pool (see https://vertx.io/docs/vertx-pg-client/java/#_pool_versus_pooled_client).

What Quarkus shall provide to users is a connection pool, not a pooled client. Pipelining for Quarkus users is possible, provided they acquire a connection and then submit several queries at once instead of waiting results between queries.

@geoand
Copy link
Contributor

geoand commented Apr 22, 2023

How would we provide a proper pool? What needs to be configured in Vertx?

@franz1981
Copy link
Contributor Author

Yeah, and not only: at this point why we should expose pipelining config in Quarkus if we currently cannot make use of it?

@geoand
Copy link
Contributor

geoand commented Apr 24, 2023

What Quarkus shall provide to users is a connection pool, not a pooled client. Pipelining for Quarkus users is possible, provided they acquire a connection and then submit several queries at once instead of waiting results between queries.

Care to elaborate on this a little further please?

@vietj
Copy link

vietj commented Apr 24, 2023

@geoand
Copy link
Contributor

geoand commented Apr 25, 2023

Thanks @vietj.

Reading that, I don't really see how Quarkus users can use pipelining. @tsegismont I see you have assigned yourself to the issue, so I guess I'll just wait for the PR :)

@vietj
Copy link

vietj commented Apr 25, 2023

@geoand they can use the pool to acquire a connection, then do pipelining over this connection and then release the connection

@geoand
Copy link
Contributor

geoand commented Apr 25, 2023

Understood, thanks

@geoand geoand removed this from the 3.1 - main milestone Apr 26, 2023
@tsegismont
Copy link
Contributor

I see you have assigned yourself to the issue, so I guess I'll just wait for the PR :)

@geoand sorry if I wasn't clear enough in #32822 (comment)

As @vietj explained later, pipelining can be used by:

  • activating the feature in the config
  • getting a connection from the pool and sending queries without waiting for results

No changes are needed, so I'm closing the issue

@tsegismont tsegismont closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2023
@geoand
Copy link
Contributor

geoand commented May 3, 2023

@tsegismont thanks.

I would like it if we could add some docs to Quarkus about how to do that.

@tsegismont
Copy link
Contributor

Sounds good. I'll take care of this.

@geoand
Copy link
Contributor

geoand commented May 3, 2023 via email

tsegismont added a commit to tsegismont/quarkus that referenced this issue Jun 12, 2023
sberyozkin pushed a commit to sberyozkin/quarkus that referenced this issue Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants