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

BASE Transaction #34914

Closed
makssent opened this issue Mar 7, 2025 · 3 comments · May be fixed by #34941
Closed

BASE Transaction #34914

makssent opened this issue Mar 7, 2025 · 3 comments · May be fixed by #34941

Comments

@makssent
Copy link
Contributor

makssent commented Mar 7, 2025

Hi everyone!
Previously used the project for testing distributed transactions (XA) using examples from the shardingsphere/examples repository. I noticed that there are no examples for BASE transactions, even though they are described in the documentation.

I attempted to add the dependencies via Maven:

<dependency>
    <groupId>org.apache.shardingsphere</groupId>
    <artifactId>shardingsphere-transaction-base</artifactId>
    <version>${project.version}</version>
</dependency>
<dependency>
    <groupId>org.apache.shardingsphere</groupId>
    <artifactId>sharding-transaction-base-seata-at</artifactId>
    <version>${project.version}</version>
</dependency>

However, the dependencies did not work Could not find artifact org.apache.shardingsphere:sharding-transaction-base-seata-at:jar:5.5.2-SNAPSHOT, and I couldn’t find any up-to-date examples or documentation for configuring BASE transactions.
Question at this point can we use BASE transactions?

P.S. I'm aware that BASE transactions require a SEATA server, but I wanted to make sure that such transactions are supported first to move forward.

@linghengqian
Copy link
Member

I noticed that there are no examples for BASE transactions, even though they are described in the documentation.

and I couldn’t find any up-to-date examples or documentation for configuring BASE transactions.

For document

For unit test about postgresql

For example git about mysql

  • We introduce a premise that the shardingsphere document is built with hugo. hugo supports mermaid drawing. But for me, testing the shardingsphere document's support for mermaid is a very troublesome thing. This results in the seata document currently having no pictures.
  • To explain the history of Seata integration of ShardingSphere, I wrote a Chinese article https://www.yuque.com/linghengqian/meve2v/es8d3a8a18odao7x , which demonstrated how to enable transaction propagation across microservices of Seata 2.2.0 for ShardingSphere jdbc 5.5.1 and MySQL 9.1.0 in multiple Spring Boot 3.3.5 microservices. This article does use the Yuque editor specifically to draw pictures.
  • I personally don't have the energy to translate this article. But the corresponding git of this article is located at https://github.com/linghengqian/shardingsphere-seata-playground , I believe it is enough to explain a lot of things. Reading this article does require an advance understanding of spring boot, seata, shardingsphere, and mysql.
  • Image

P.S. I'm aware that BASE transactions require a SEATA server, but I wanted to make sure that such transactions are supported first to move forward.

When using ShardingSphere’s Seata integration module, the database instance connected to ShardingSphere should implement both ShardingSphere’s dialect parsing support and Seata AT mode’s dialect parsing support. This type of database includes but is not limited to mysql, gvenzl/oracle-free, gvenzl/oracle-xe, postgres, mcr.microsoft.com/mssql/server and other Docker Images.

  • Databases with this feature include but are not limited to the following Docker Images,
  1. Third-party Docker Image mysql for MySQL Community Server
  2. Third-party Docker Image gvenzl/oracle-free for Oracle Database Free
  3. Third-party Docker Image gvenzl/oracle-xe for Oracle Database Express Edition (XE)
  4. Third-party Docker Image postgres for PostgreSQL
  5. Official Docker Image mcr.microsoft.com/mssql/server for Microsoft SQL Server
  • Seata also supports DM represented by DM8, but that is a commercial database. Dameng does not provide docker image to non-paying users. Refer to https://www.dameng.com/DM8.html . Seata obviously supports DM8 in a mock way, and Shardingsphere will not try to test this database that lacks docker image in the master branch.

@makssent
Copy link
Contributor Author

makssent commented Mar 7, 2025

For document

Thank you, this is exactly the information I was looking for. As always, you explained everything in detail and clearly. Now I can start testing BASE with JDBC. Hopefully I won't have to pester you with any more questions, but it's not certain :)

@linghengqian
Copy link
Member

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

Successfully merging a pull request may close this issue.

2 participants