Skip to content

Conversation

Torch3333
Copy link
Contributor

@Torch3333 Torch3333 commented Oct 3, 2025

Description

This adds support for AlloyDB versions 15 and 16, a fully PostgreSQL-compliant database. Connection to AlloyDB is done through the PostgreSQL JDBC driver.

A standalone version of AlloyDB called Omni is used to run the CI.
By default, AlloyDB and Omni use a database collation that is not compatible with ScalarDB. The default collation causes ScalarDB and AlloyDB to yield different results in string comparisons, which can lead to fundamental issues. Therefore, users must ensure that the AlloyDB database utilizes the icu-locale named en-US-u-va-posix.

A sample configuration to connect to local AlloyDB Omni is identical to PostgreSQL

# scalar.db.storage=jdbc
# scalar.db.contact_points=jdbc:postgresql://localhost:5432/
# scalar.db.username=postgres
# scalar.db.password=postgres

A sample configuration to connect to AlloyDB on GCP through a public IP using the Java connector:

# scalar.db.storage=jdbc
# scalar.db.contact_points=jdbc:postgresql:///<DATABASE_NAME>?socketFactory=com.google.cloud.alloydb.SocketFactory&alloydbInstanceName=<INSTANCE_NAME>&alloydbIpType=PUBLIC
# scalar.db.username=postgres
# scalar.db.password=postgres

Related issues and/or PRs

N/A

Changes made

  • Add CI for AlloyDB 15 and 16 using Omni
  • Adds the Gradle dependency "Java-connector for AlloyDB" that greatly facilitates establishing a secure connection to AlloyDB on GCP. More details in this documentation

Checklist

The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item.

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • I have considered whether similar issues could occur in other products, components, or modules if this PR is for bug fixes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • Tests (unit, integration, etc.) have been added for the changes.
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

N/A

Release notes

AlloyDB versions 15 and 16 are now supported as underlying storage by using the PostgreSQL JDBC driver.

@Torch3333 Torch3333 self-assigned this Oct 3, 2025
@Torch3333 Torch3333 added the enhancement New feature or request label Oct 3, 2025
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_INITDB_ARGS: "--icu-locale=en-US-u-va-posix"
Copy link
Contributor Author

@Torch3333 Torch3333 Oct 3, 2025

Choose a reason for hiding this comment

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

This sets the database collation to match ScalarDB string ordering.

@Torch3333 Torch3333 marked this pull request as ready for review October 3, 2025 08:04
@Torch3333 Torch3333 requested review from a team, brfrn169, Copilot, feeblefakie and komamitsu and removed request for a team October 3, 2025 08:04
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for AlloyDB versions 15 and 16, a PostgreSQL-compliant database service from Google Cloud Platform. The changes enable connection to AlloyDB using the PostgreSQL JDBC driver and add CI testing using AlloyDB Omni.

  • Added dependency for Google Cloud AlloyDB JDBC connector
  • Added CI workflows for AlloyDB 15 and 16 integration testing
  • Configured AlloyDB Omni containers with required icu-locale settings

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
core/build.gradle Adds AlloyDB JDBC connector dependency for GCP connectivity
.github/workflows/ci.yaml Adds integration test workflows for AlloyDB 15 and 16 using Omni containers

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

@komamitsu
Copy link
Contributor

# scalar.db.contact_points=jdbc:postgresql:///<DATABASE_NAME>?socketFactory=com.google.cloud.alloydb.SocketFactory&alloydbInstanceName=<INSTANCE_NAME>&alloydbIpType=PUBLIC

@Torch3333 Just a confirmation. This configuration and the locale issue will be documented later?

Copy link
Collaborator

@brfrn169 brfrn169 left a comment

Choose a reason for hiding this comment

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

Left a comment. Other than that, LGTM! Thank you!

- 5432:5432

strategy:
fail-fast: false
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please add fail-fast: false to the integration tests for the other databases as well?

Copy link
Contributor

@komamitsu komamitsu left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

I left a comment about documentation, but this PR itself looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants