Skip to content

Conversation

@Torch3333
Copy link
Contributor

@Torch3333 Torch3333 commented Dec 5, 2025

Description

This adds TiDB and AlloyDB to ScalarDB core and ScalarDB Cluster samples.
Since TiDB is not started with Docker but using the tiup CLI, this does not add TiDB to the Docker compose files.

Note

Please review this alongside this PR https://github.com/scalar-labs/docs-internal-scalardb/pull/1972 on the ScalarDB internal doc repository.

Related issues and/or PRs

Changes made

  • Add TiDB and AlloyDB basic configuration
  • Add AlloyDB service to Docker compose files

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.
  • 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)

Provide any additional information or notes that may be relevant to the reviewers or stakeholders.

Copilot AI review requested due to automatic review settings December 5, 2025 00:52
@Torch3333 Torch3333 self-assigned this Dec 5, 2025
@gemini-code-assist
Copy link

Summary of Changes

Hello @Torch3333, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly expands ScalarDB's compatibility by introducing support and sample configurations for TiDB and AlloyDB. The changes provide developers with ready-to-use Docker Compose setups for AlloyDB and clear, commented-out configuration examples for both databases, streamlining the process of integrating ScalarDB with these popular distributed and cloud-native data stores.

Highlights

  • AlloyDB Docker Compose Integration: Docker Compose configurations for AlloyDB have been added to both the scalardb-cluster-standalone-mode and scalardb-sample directories to facilitate local development and testing with AlloyDB Omni.
  • TiDB and AlloyDB Configuration Examples: Commented-out configuration examples for connecting ScalarDB to TiDB and AlloyDB via JDBC have been added to scalardb-cluster-node.properties and scalardb-sample/database.properties, providing clear guidance for integration.
  • TiDB Deployment Note: It is noted that TiDB is not included in the Docker Compose files as it is typically started using the tiup CLI, rather than standard Docker containers, which is an important distinction for users.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds configuration for TiDB and AlloyDB to the ScalarDB core and cluster samples. The changes are a good addition, but I've found a port conflict in both docker-compose.yaml files. The new alloydb service is configured to use host port 5432, which is already in use by the existing postgres service. This would cause docker-compose up to fail. I've provided suggestions to fix this by using a different host port for AlloyDB. For the scalardb-sample, a corresponding change in database.properties is also suggested.

@Torch3333 Torch3333 changed the title Add TiDB and AlloyDB to ScalarDB core and ScalarDB Cluster sample Add TiDB and AlloyDB to ScalarDB core and ScalarDB Cluster samples Dec 5, 2025
Copy link

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 TiDB and AlloyDB databases to the ScalarDB sample configurations. TiDB is configured to run externally via the tiup CLI tool, while AlloyDB is added as a Docker service using the AlloyDB Omni container image. The changes enable developers to test ScalarDB functionality with these additional database backends.

  • Added AlloyDB Docker service definitions to both sample compose files
  • Added JDBC connection configurations for TiDB and AlloyDB to properties files
  • Configured AlloyDB with PostgreSQL-compatible settings and ICU locale support

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
scalardb-sample/docker-compose.yml Adds AlloyDB service with PostgreSQL compatibility using google/alloydbomni:16 image
scalardb-sample/database.properties Adds commented configuration examples for TiDB (MySQL-based) and AlloyDB (PostgreSQL-based) JDBC connections
scalardb-cluster-standalone-mode/scalardb-cluster-node.properties Adds TiDB and AlloyDB configuration blocks with Docker networking support (host.docker.internal and container names)
scalardb-cluster-standalone-mode/docker-compose.yaml Adds AlloyDB service definition matching the scalardb-sample configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Torch3333 Torch3333 requested review from a team, brfrn169, feeblefakie and komamitsu and removed request for a team December 9, 2025 02:45
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!

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.

LGTM! Thank you!

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! 👍

@Torch3333 Torch3333 merged commit 7dde56b into main Dec 10, 2025
32 checks passed
@Torch3333 Torch3333 deleted the add_tidb_alloydb_to_scalardb_and_cluster_sample branch December 10, 2025 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants