Skip to content

chore: deprecate experimental host option/parameter#4575

Merged
olavloite merged 3 commits into
GoogleCloudPlatform:postgresql-dialectfrom
sagnghos:spannerOmni
Jul 2, 2026
Merged

chore: deprecate experimental host option/parameter#4575
olavloite merged 3 commits into
GoogleCloudPlatform:postgresql-dialectfrom
sagnghos:spannerOmni

Conversation

@sagnghos

@sagnghos sagnghos commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Uptaking change in googleapis/google-cloud-java#13236 to deprecate (experimental host / external host) parameters / options to uptake the new Type parameter

To run Integration test against Spanner Omni use below parameters:

-DUSE_PLAIN_TEXT=true
-DSPANNER_OMNI_HOST=localhost:15000
-DSPANNER_OMNI_CLIENT_CERT=/path/to/client/cert -DSPANNER_OMNI_CLIENT_KEY=/path/to/client/key
-Djavax.net.ssl.trustStore=$JAVA_HOME/lib/security/cacerts -Djavax.net.ssl.trustStoreType=JKS

Additional change in ITLiquibaseTest

Fix ProcessBuilder Deadlock in ITLiquibaseTest
Problem: ITLiquibaseTest was prone to freezing indefinitely when executing the mvn liquibase subprocess. The test code attempted to read the process's stderr stream to completion before reading stdout. Because the Liquibase Maven plugin generates a massive amount of stdout logs (fetching dependencies, evaluating changelogs), the OS stdout buffer would fill up, causing the subprocess to pause. This resulted in an I/O deadlock: Java was waiting for stderr to finish, while the subprocess was waiting for Java to clear stdout.

Solution: Merged the error and output streams by setting builder.redirectErrorStream(true) on the ProcessBuilder. This routes all stderr output directly into stdout, allowing the test thread to continuously drain a single unified stream. This prevents the buffer from filling up and completely eliminates the deadlock.

sagnghos added 2 commits July 1, 2026 09:55
…n PgAdapterTestEnv

- Dynamically handle USE_PLAIN_TEXT to toggle http vs https.

- Add support for injecting SPANNER_OMNI_CLIENT_CERT and SPANNER_OMNI_CLIENT_KEY properties to the client configuration.
@sagnghos
sagnghos marked this pull request as ready for review July 1, 2026 11:04
Comment thread src/main/java/com/google/cloud/spanner/pgadapter/metadata/OptionsMetadata.java Outdated
&& propertyMap.containsKey(IS_EXPERIMENTAL_HOST_PROPERTY_NAME);
&& (commandLine.hasOption(OPTION_JDBC_PROPERTIES)
&& (propertyMap.containsKey("isExperimentalHost")
|| SPANNER_OMNI_TYPE.equalsIgnoreCase(propertyMap.get(TYPE_PROPERTY_NAME))));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This lookup in propertyMap will fail if someone added Type=omni to the connection string. This is actually a generic problem for multiple other properties here as well. Can we change the type of map that is used for this to this:

Map<String, String> properties = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

…meters

- Fixes bug where 'Type=omni' or other mixed-cased keys were ignored.

- Replace HashMap with TreeMap(String.CASE_INSENSITIVE_ORDER) when parsing JDBC properties.

- Remove deprecated setExperimentalHost.
@olavloite
olavloite merged commit f449f95 into GoogleCloudPlatform:postgresql-dialect Jul 2, 2026
45 checks passed
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.

2 participants