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

Preferred server type connection factory #1064

Open
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

Rattenkrieg
Copy link
Contributor

@Rattenkrieg Rattenkrieg commented Nov 8, 2021

This PR introduces a way to specify required/preferred server type among multiple servers when several hosts provided to pool factory.
Example:

PgPool.pool(Vertx.vertx(), List.of(primaryHostOptions, replica1HostOptions, replica2HostOptions), poolOptions.setServerRequirement(PREFER_REPLICA))

Similar functionality provided by pgjdbc via targetServerType and libpq via target_session_attrs.

  • javadocs

tsegismont and others added 30 commits June 28, 2021 23:31
Fixes eclipse-vertx#963

In particular, ODBC_ON implies ANSI_DEFAULTS which activates the following ISO behaviors:

- ANSI_NULLS
- CURSOR_CLOSE_ON_COMMIT
- ANSI_NULL_DFLT_ON
- IMPLICIT_TRANSACTIONS
- ANSI_PADDING
- QUOTED_IDENTIFIER
- ANSI_WARNINGS

Signed-off-by: Thomas Segismont <[email protected]>
Fixes eclipse-vertx#977

LocalTime, LocalDateTime and OffsetDateTime have nanosecond precision.
Also, the maximum scale in MSSQL is 7 (hundreds of nanos).

So when encoding time-related values, we will always send a value with maximum scale.
The server will do round/truncate as necessary.

Signed-off-by: Thomas Segismont <[email protected]>
See eclipse-vertx#983

Temporarily disabling in order to let CI deploy snaphots of clients

Signed-off-by: Thomas Segismont <[email protected]>
* Implement batch queries for MSSQL Client

Closes eclipse-vertx#607

Signed-off-by: Thomas Segismont <[email protected]>

* Tracing tests are now fully passing

Signed-off-by: Thomas Segismont <[email protected]>
Moving all encoding, decoding, and metadata parsing logic to the same class.

Also, put common buffer modification methods to utility

Signed-off-by: Thomas Segismont <[email protected]>
…x#988)

* Allow to configure SQL Server container with a fixed port

This simplifies debugging with tools like wireshark.

Signed-off-by: Thomas Segismont <[email protected]>

* Allow to configure PostgreSQL Server container with a fixed port

This simplifies debugging with tools like wireshark.

Signed-off-by: Thomas Segismont <[email protected]>

* Update documentation

Signed-off-by: Thomas Segismont <[email protected]>
Removes overhead of looking up value while no specific behavior is attached to it.

Signed-off-by: Thomas Segismont <[email protected]>
Signed-off-by: Thomas Segismont <[email protected]>
Removes overhead of looking up value while no specific behavior is attached to it.

Signed-off-by: Thomas Segismont <[email protected]>
Signed-off-by: Thomas Segismont <[email protected]>
Removes overhead of looking up value while no specific behavior is attached to it.

Signed-off-by: Thomas Segismont <[email protected]>
Signed-off-by: Thomas Segismont <[email protected]>
Signed-off-by: Thomas Segismont <[email protected]>
@Rattenkrieg Rattenkrieg changed the title [WIP] Preferred server type connection factory Preferred server type connection factory Nov 9, 2021
@Rattenkrieg
Copy link
Contributor Author

Hey @vietj any chance you could have a look?

@vietj
Copy link
Member

vietj commented Nov 19, 2021

sure @Rattenkrieg

@vietj
Copy link
Member

vietj commented Dec 6, 2021

the new server type and requirements are specific to PG and the selection code should be in vertx-pg-client instead of vertx-sql-client

@vietj
Copy link
Member

vietj commented Dec 6, 2021

it seems that this specific mechanism should be used as a PgPool connection provider

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.

5 participants