Replies: 16 comments 30 replies
-
@strongduanmu @TherChenYang I also have the same problem, which has been resolved for two or three days but still hasn't been resolved.Help!~ |
Beta Was this translation helpful? Give feedback.
-
@WXingSong ok, the same problem occurred at #31667, I will check it |
Beta Was this translation helpful? Give feedback.
-
@TherChenYang T What is the current stable version for SpringCloudAlibaba 2022.0.0? The corresponding version of Seata is Seata 1.7, but there is an issue when integrating 1.7. According to #30146, Seata needs to use 2.0. Does the lower version of Shading jdbc support it? I hope to reduce the version usage before this issue is resolved. |
Beta Was this translation helpful? Give feedback.
-
@linghengqian Can you help with this issue? I see that several Seata-related issues have been fixed in #30146. |
Beta Was this translation helpful? Give feedback.
-
@Famezyy I also have the same problem, have you solved it? I found that when feign remotely calls the interface, the called interface |
Beta Was this translation helpful? Give feedback.
-
no I'm not able to resolve it, hope they can provide a solution :) |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@linghengqian Thank you for your time, I have added a junit test with a description, you can simply run |
Beta Was this translation helpful? Give feedback.
-
TL;DR
Why?
sdk install java 17.0.11-ms
sdk use java 17.0.11-ms
git clone [email protected]:linghengqian/code-repo.git -b test
cd ./code-repo/
cd ./springboot-example/seata-provider/
./gradlew clean test
sdk install java 17.0.11-ms
sdk use java 17.0.11-ms
git clone [email protected]:linghengqian/code-repo.git -b test
cd ./code-repo/
cd ./springboot-example/seata-provider/
./gradlew clean bootJar -x test
cd ../seata-consumer/
./gradlew clean test
|
Beta Was this translation helpful? Give feedback.
-
Actually that's why I added
So I guess the problem here is that maybe the way of configuring XID in |
Beta Was this translation helpful? Give feedback.
-
I saw this article https://community.sphere-ex.com/t/topic/460/2.
Does that mean that Sharding's distributed transactions do not apply to cross services? I suggest supporting transaction rollback between microservices, which is the commonly used business scenario for Seata. @terrymanu |
Beta Was this translation helpful? Give feedback.
-
I think I found the issue: suppose that A service is calling B service, if we set the XID as soon as the request come into B service, shardingsphere will not set
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
sdk install java 22.0.1-graalce
sdk use java 22.0.1-graalce
git clone [email protected]:apache/shardingsphere.git
cd ./shardingsphere/
git reset --hard 2600de61b657046e3ce2ae82590890864e2305bb
./mvnw clean install -Prelease -T1C -DskipTests -Djacoco.skip=true -Dcheckstyle.skip=true -Drat.skip=true -Dmaven.javadoc.skip=true
<project>
<dependencies>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc</artifactId>
<version>5.5.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-transaction-base-seata-at</artifactId>
<version>5.5.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.seata</groupId>
<artifactId>seata-all</artifactId>
<version>2.0.0</version>
<exclusions>
<exclusion>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
implementation 'org.apache.shardingsphere:shardingsphere-jdbc:5.5.1-SNAPSHOT'
implementation 'org.apache.shardingsphere:shardingsphere-transaction-base-seata-at:5.5.1-SNAPSHOT'
implementation('io.seata:seata-all:2.0.0') {
exclude group: 'org.antlr', module: 'antlr4-runtime'
}
}
|
Beta Was this translation helpful? Give feedback.
-
In SpringBoot, you can rewrite SeataATShardingSphereTransactionManager like this Remaining additions5.5.0版本bug及修复
|
Beta Was this translation helpful? Give feedback.
-
I'm using version 5.5.0, but when incorporating seata it is not working as expected.
I first created two services: consumer and provider, and the provider service is been called in consumer service.
Then checked the official documentation and disabled the auto data proxy of seata. Also refered to #22356 and #30146 and added the following interceptor in the provider service:
but when error occured in consumer service after calling provider service, rollback only happened in consumer service.
consumer service log
provider service log
You can see there was no rollback happened in provider service.
I"m not sure if it is correct but in provider service it was also registering TM and RM, and there was no any branch transaction been registered.
When debugging it, I found that in provider service, it is entering the
commit()
method ofDefaultGlobalTransaction
fromSeataATShardingSphereTransactionManager
, and as thetransaction role
isParticipant
, it is doing nothing but just print out log says ignore commit:But actually it should not come to here, I'm expecting it can register a branch transaction and commit it but not try to commit the global transaction directly.
you can find the example code in the below repo.
https://github.com/Famezyy/code-repo/tree/master
could you please tell me how to fix it?
Beta Was this translation helpful? Give feedback.
All reactions