172167396 commented on issue #22356:
URL:
https://github.com/apache/shardingsphere/issues/22356#issuecomment-1488061299
Same as mine,if i set the xid in transactionPropagationInterceptor of
child-system,
and the method is annotated with
@ShardingSphereTransactionType(TransactionType.BASE),
then it won't do "SeataTransactionHolder.set(globalTransaction);",
finally NPE happend; if i don't set the xid from feign, in code
'GlobalTransactionContext.getCurrentOrCreate()'
it will begin a new global transaction with different xid, i don't know why
in this place it choose to get xid from RootContext,but before this
code,"switch
(connectionManager.getConnectionTransaction().getDistributedTransactionOperationType(autoCommit))"
means you can't hold a xid, it confused me.
dependency:
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
<version>5.2.0</version>
</dependency>
<dependency>
<groupId>io.seata</groupId>
<artifactId>seata-all</artifactId>
<version>1.4.2</version>
<exclusions>
<exclusion>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-transaction-base-seata-at</artifactId>
<version>5.2.0</version>
</dependency>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]