Skip to content
Snippets Groups Projects
Unverified Commit 23a407e2 authored by WangLiang/王良's avatar WangLiang/王良 Committed by GitHub
Browse files

bugfix: when mixed use of AT and TCC, AT branchs is not deleted (#3296)

parent 15f0d6e8
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ seata.tx-service-group=my_test_tx_group
seata.enable-auto-data-source-proxy=true
seata.data-source-proxy-mode=AT
seata.use-jdk-proxy=false
seata.client.rm.async-commit-buffer-limit=1000
seata.client.rm.async-commit-buffer-limit=10000
seata.client.rm.report-retry-count=5
seata.client.rm.table-meta-check-enable=false
seata.client.rm.report-success-enable=false
......@@ -40,7 +40,7 @@ seata.client.undo.data-validation=true
seata.client.undo.log-serialization=jackson
seata.client.undo.only-care-update-columns=true
seata.client.undo.log-table=undo_log
seata.log.exceptionRate=100
seata.log.exception-rate=100
seata.service.vgroup-mapping.my_test_tx_group=default
seata.service.grouplist.default=127.0.0.1:8091
seata.service.enable-degrade=false
......@@ -74,7 +74,7 @@ seata.config.apollo.namespace=application
seata.config.etcd3.server-addr=http://localhost:2379
seata.config.nacos.namespace=
seata.config.nacos.serverAddr=127.0.0.1:8848
seata.config.nacos.server-addr=127.0.0.1:8848
seata.config.nacos.group=SEATA_GROUP
seata.config.nacos.username=
seata.config.nacos.password=
......@@ -91,7 +91,7 @@ seata.registry.type=file
seata.registry.consul.server-addr=127.0.0.1:8500
seata.registry.etcd3.serverAddr=http://localhost:2379
seata.registry.etcd3.server-addr=http://localhost:2379
seata.registry.eureka.weight=1
seata.registry.eureka.service-url=http://localhost:8761/eureka
......@@ -112,7 +112,7 @@ seata.registry.sofa.server-addr=127.0.0.1:9603
seata.registry.sofa.region=DEFAULT_ZONE
seata.registry.sofa.datacenter=DefaultDataCenter
seata.registry.sofa.group=SEATA_GROUP
seata.registry.sofa.addressWaitTime=3000
seata.registry.sofa.address-wait-time=3000
seata.registry.sofa.application=default
seata.registry.zk.server-addr=127.0.0.1:2181
......
......@@ -8,7 +8,7 @@ seata:
excludes-for-auto-proxying: firstClassNameForExclude,secondClassNameForExclude
client:
rm:
async-commit-buffer-limit: 1000
async-commit-buffer-limit: 10000
report-retry-count: 5
table-meta-check-enable: false
report-success-enable: false
......@@ -68,8 +68,8 @@ seata:
etcd3:
server-addr: http://localhost:2379
nacos:
namespace:
serverAddr: 127.0.0.1:8848
namespace: ""
server-addr: 127.0.0.1:8848
group: SEATA_GROUP
username: ""
password: ""
......@@ -90,7 +90,7 @@ seata:
consul:
server-addr: 127.0.0.1:8500
etcd3:
serverAddr: http://localhost:2379
server-addr: http://localhost:2379
eureka:
weight: 1
service-url: http://localhost:8761/eureka
......@@ -98,20 +98,20 @@ seata:
application: seata-server
server-addr: 127.0.0.1:8848
group : "SEATA_GROUP"
namespace:
namespace: ""
username: ""
password: ""
redis:
server-addr: localhost:6379
db: 0
password:
password: ""
timeout: 0
sofa:
server-addr: 127.0.0.1:9603
region: DEFAULT_ZONE
datacenter: DefaultDataCenter
group: SEATA_GROUP
addressWaitTime: 3000
address-wait-time: 3000
application: default
zk:
server-addr: 127.0.0.1:2181
......@@ -122,4 +122,4 @@ seata:
custom:
name: ""
log:
exceptionRate: 100
\ No newline at end of file
exception-rate: 100
\ No newline at end of file
......@@ -150,6 +150,16 @@
"sourceType": "io.seata.spring.boot.autoconfigure.properties.client.UndoProperties",
"defaultValue": true
},
{
"name": "seata.client.log.exception-rate",
"type": "java.lang.Integer",
"sourceType": "io.seata.spring.boot.autoconfigure.properties.client.LogProperties",
"deprecation": {
"level": "error",
"replacement": "seata.log.exception-rate",
"reason": "The location of this configuration has been changed to 'seata.log.exception-rate'."
}
},
{
"name": "seata.log.exception-rate",
"type": "java.lang.Integer",
......
......@@ -162,7 +162,8 @@ public class DefaultCore implements Core {
if (shouldCommit) {
boolean success = doGlobalCommit(globalSession, false);
if (success && !globalSession.getBranchSessions().isEmpty()) {
//If successful and all remaining branches can be committed asynchronously, do async commit.
if (success && globalSession.hasBranch() && globalSession.canBeCommittedAsync()) {
globalSession.asyncCommit();
return GlobalStatus.Committed;
} else {
......@@ -235,11 +236,14 @@ public class DefaultCore implements Core {
}
}
}
if (globalSession.hasBranch()) {
//If has branch and not all remaining branches can be committed asynchronously,
//do print log and return false
if (globalSession.hasBranch() && !globalSession.canBeCommittedAsync()) {
LOGGER.info("Committing global transaction is NOT done, xid = {}.", globalSession.getXid());
return false;
}
}
//If success and there is no branch, end the global transaction.
if (success && globalSession.getBranchSessions().isEmpty()) {
SessionHelper.endCommitted(globalSession);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment