feat: support tidb as one of the storage databases #5808
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changed?
Supported TiDB as one of the storage databases for Temporal.
Originally, copied from MySQL support, but changed some points followed:
column_name [not] like '%XXX%'
instead.Why?
TiDB (/’taɪdiːbi:/, "Ti" stands for Titanium) is an open-source distributed SQL database that supports Hybrid Transactional and Analytical Processing (HTAP) workloads. It is MySQL compatible and features horizontal scalability, strong consistency, and high availability. The goal of TiDB is to provide users with a one-stop database solution that covers OLTP (Online Transactional Processing), OLAP (Online Analytical Processing), and HTAP services. TiDB is suitable for various use cases that require high availability and strong consistency with large-scale data.
So I think TiDB and Temporal will have bilateral benefits if we integrate them together.
How did you test it?
Adopted all MySQL's unit tests to TiDB. And all pasted.
You can follow this way to test it.
config.toml
:Within
mysql
shell, create user and password:go test -run ^TestTiDB go.temporal.io/server/common/persistence/tests -test.v
Here is a capture that shows the tested result from my side:
Potential risks
Nope
Documentation
Yes, I added a new document in
docs/development/macos/tidb.md
and changed thedocs/development/run-dependencies-host.md
.Is hotfix candidate?
No