- dble version:
- preconditions :
no
- configs:
schema.xml
<table name="xa_test" dataNode="dn1,dn2" rule="sharding-by-mod2" primaryKey="ID"/>
rule.xml
<tableRule name="sharding-by-mod2">
<rule>
<columns>id</columns>
<algorithm>hashmod2</algorithm>
</rule>
</tableRule>
<function name="hashmod2" class="Hash">
<property name="partitionCount">2</property>
<property name="partitionLength">1</property>
</function>
server.xml
steps:
step1. executing following command
delete from xa_test;
INSERT INTO xa_test (id) VALUES(1),(2),(3);
set xa=1;
delete from xa_test;
Before you execute delete from xa_test; the second time, set a break point in method com.actiontech.dble.backend.mysql.nio.handler.transaction.xa.XACommitNodesHandler#preparePhase

step2. kill connection manually to imitate the network failure

step3 check result of the second delete statement

- expect result:
- If the implicit transaction failed to commit and is rollbacked automatically
(DML executed sucessfully but xa prepare run into network failure) , then error message that 【indicate the fact of auto-rollback behaviour】 and 【the real error message】 should be returned to the user.
- real result:
- It's OK Packet...
- supplements:
1.
/label ~BUG