From 6e02fc4ca81b19e3ca0695dc996a0a48bda45b31 Mon Sep 17 00:00:00 2001 From: "jimin.jm" Date: Tue, 16 Apr 2019 21:42:49 +0800 Subject: [PATCH] upgrade seata dependency and config Signed-off-by: jimin.jm --- spring-cloud-alibaba-coverage/pom.xml | 2 +- spring-cloud-alibaba-dependencies/pom.xml | 2 +- .../src/main/resources/file.conf | 15 ++++++++--- .../src/main/resources/registry.conf | 26 ++++++++++++++++--- .../src/main/resources/file.conf | 15 ++++++++--- .../src/main/resources/registry.conf | 26 ++++++++++++++++--- .../src/main/resources/file.conf | 15 ++++++++--- .../src/main/resources/registry.conf | 26 ++++++++++++++++--- .../src/main/resources/file.conf | 15 ++++++++--- .../src/main/resources/registry.conf | 26 ++++++++++++++++--- 10 files changed, 142 insertions(+), 26 deletions(-) diff --git a/spring-cloud-alibaba-coverage/pom.xml b/spring-cloud-alibaba-coverage/pom.xml index c459d147..f21e056c 100644 --- a/spring-cloud-alibaba-coverage/pom.xml +++ b/spring-cloud-alibaba-coverage/pom.xml @@ -63,7 +63,7 @@ org.springframework.cloud - spring-cloud-alibaba-fescar + spring-cloud-alibaba-seata ${spring.cloud.alibaba.version} diff --git a/spring-cloud-alibaba-dependencies/pom.xml b/spring-cloud-alibaba-dependencies/pom.xml index e456df53..54cbb7c7 100644 --- a/spring-cloud-alibaba-dependencies/pom.xml +++ b/spring-cloud-alibaba-dependencies/pom.xml @@ -19,7 +19,7 @@ 1.5.1 3.1.0 - 0.4.0 + 0.4.2 1.0.0 0.8.0 1.0.8 diff --git a/spring-cloud-alibaba-examples/seata-example/account-service/src/main/resources/file.conf b/spring-cloud-alibaba-examples/seata-example/account-service/src/main/resources/file.conf index 857b089e..b49739a1 100644 --- a/spring-cloud-alibaba-examples/seata-example/account-service/src/main/resources/file.conf +++ b/spring-cloud-alibaba-examples/seata-example/account-service/src/main/resources/file.conf @@ -20,17 +20,26 @@ transport { worker-thread-size = 8 } } +store { + # branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions + max-branch-session-size = 16384 + # globe session size , if exceeded throws exceptions + max-global-session-size = 512 + # file buffer size , if exceeded allocate new buffer + file-write-buffer-cache-size = 16384 + # when recover batch read size + session.reload.read_size = 100 +} service { #vgroup->rgroup - vgroup_mapping.account-service-fescar-service-group = "localRgroup" + vgroup_mapping.account-service-fescar-service-group = "default" #only support single node - localRgroup.grouplist = "127.0.0.1:8091" + default.grouplist = "127.0.0.1:8091" #degrade current not support enableDegrade = false #disable disable = false } - client { async.commit.buffer.limit = 10000 lock { diff --git a/spring-cloud-alibaba-examples/seata-example/account-service/src/main/resources/registry.conf b/spring-cloud-alibaba-examples/seata-example/account-service/src/main/resources/registry.conf index 8a79c9f2..31bcace5 100644 --- a/spring-cloud-alibaba-examples/seata-example/account-service/src/main/resources/registry.conf +++ b/spring-cloud-alibaba-examples/seata-example/account-service/src/main/resources/registry.conf @@ -1,5 +1,5 @@ registry { - # file 、nacos 、redis + # file 、nacos 、eureka、redis、zk、consul type = "file" nacos { @@ -7,17 +7,32 @@ registry { namespace = "public" cluster = "default" } + eureka { + serviceUrl = "http://localhost:1001/eureka" + application = "default" + weight = "1" + } redis { serverAddr = "localhost:6379" db = "0" } + zk { + cluster = "default" + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + } + consul { + cluster = "default" + serverAddr = "127.0.0.1:8500" + } file { name = "file.conf" } } config { - # file nacos apollo + # file、nacos 、apollo、zk type = "file" nacos { @@ -29,7 +44,12 @@ config { app.id = "fescar-server" apollo.meta = "http://192.168.1.204:8801" } + zk { + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + } file { name = "file.conf" } -} \ No newline at end of file +} diff --git a/spring-cloud-alibaba-examples/seata-example/business-service/src/main/resources/file.conf b/spring-cloud-alibaba-examples/seata-example/business-service/src/main/resources/file.conf index b087a18c..39beec98 100644 --- a/spring-cloud-alibaba-examples/seata-example/business-service/src/main/resources/file.conf +++ b/spring-cloud-alibaba-examples/seata-example/business-service/src/main/resources/file.conf @@ -20,17 +20,26 @@ transport { worker-thread-size = 8 } } +store { + # branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions + max-branch-session-size = 16384 + # globe session size , if exceeded throws exceptions + max-global-session-size = 512 + # file buffer size , if exceeded allocate new buffer + file-write-buffer-cache-size = 16384 + # when recover batch read size + session.reload.read_size = 100 +} service { #vgroup->rgroup - vgroup_mapping.business-service-fescar-service-group = "localRgroup" + vgroup_mapping.business-service-fescar-service-group = "default" #only support single node - localRgroup.grouplist = "127.0.0.1:8091" + default.grouplist = "127.0.0.1:8091" #degrade current not support enableDegrade = false #disable disable = false } - client { async.commit.buffer.limit = 10000 lock { diff --git a/spring-cloud-alibaba-examples/seata-example/business-service/src/main/resources/registry.conf b/spring-cloud-alibaba-examples/seata-example/business-service/src/main/resources/registry.conf index 8a79c9f2..31bcace5 100644 --- a/spring-cloud-alibaba-examples/seata-example/business-service/src/main/resources/registry.conf +++ b/spring-cloud-alibaba-examples/seata-example/business-service/src/main/resources/registry.conf @@ -1,5 +1,5 @@ registry { - # file 、nacos 、redis + # file 、nacos 、eureka、redis、zk、consul type = "file" nacos { @@ -7,17 +7,32 @@ registry { namespace = "public" cluster = "default" } + eureka { + serviceUrl = "http://localhost:1001/eureka" + application = "default" + weight = "1" + } redis { serverAddr = "localhost:6379" db = "0" } + zk { + cluster = "default" + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + } + consul { + cluster = "default" + serverAddr = "127.0.0.1:8500" + } file { name = "file.conf" } } config { - # file nacos apollo + # file、nacos 、apollo、zk type = "file" nacos { @@ -29,7 +44,12 @@ config { app.id = "fescar-server" apollo.meta = "http://192.168.1.204:8801" } + zk { + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + } file { name = "file.conf" } -} \ No newline at end of file +} diff --git a/spring-cloud-alibaba-examples/seata-example/order-service/src/main/resources/file.conf b/spring-cloud-alibaba-examples/seata-example/order-service/src/main/resources/file.conf index 4f893da5..2ef4f39a 100644 --- a/spring-cloud-alibaba-examples/seata-example/order-service/src/main/resources/file.conf +++ b/spring-cloud-alibaba-examples/seata-example/order-service/src/main/resources/file.conf @@ -20,17 +20,26 @@ transport { worker-thread-size = 8 } } +store { + # branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions + max-branch-session-size = 16384 + # globe session size , if exceeded throws exceptions + max-global-session-size = 512 + # file buffer size , if exceeded allocate new buffer + file-write-buffer-cache-size = 16384 + # when recover batch read size + session.reload.read_size = 100 +} service { #vgroup->rgroup - vgroup_mapping.order-service-fescar-service-group = "localRgroup" + vgroup_mapping.order-service-fescar-service-group = "default" #only support single node - localRgroup.grouplist = "127.0.0.1:8091" + default.grouplist = "127.0.0.1:8091" #degrade current not support enableDegrade = false #disable disable = false } - client { async.commit.buffer.limit = 10000 lock { diff --git a/spring-cloud-alibaba-examples/seata-example/order-service/src/main/resources/registry.conf b/spring-cloud-alibaba-examples/seata-example/order-service/src/main/resources/registry.conf index 8a79c9f2..31bcace5 100644 --- a/spring-cloud-alibaba-examples/seata-example/order-service/src/main/resources/registry.conf +++ b/spring-cloud-alibaba-examples/seata-example/order-service/src/main/resources/registry.conf @@ -1,5 +1,5 @@ registry { - # file 、nacos 、redis + # file 、nacos 、eureka、redis、zk、consul type = "file" nacos { @@ -7,17 +7,32 @@ registry { namespace = "public" cluster = "default" } + eureka { + serviceUrl = "http://localhost:1001/eureka" + application = "default" + weight = "1" + } redis { serverAddr = "localhost:6379" db = "0" } + zk { + cluster = "default" + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + } + consul { + cluster = "default" + serverAddr = "127.0.0.1:8500" + } file { name = "file.conf" } } config { - # file nacos apollo + # file、nacos 、apollo、zk type = "file" nacos { @@ -29,7 +44,12 @@ config { app.id = "fescar-server" apollo.meta = "http://192.168.1.204:8801" } + zk { + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + } file { name = "file.conf" } -} \ No newline at end of file +} diff --git a/spring-cloud-alibaba-examples/seata-example/storage-service/src/main/resources/file.conf b/spring-cloud-alibaba-examples/seata-example/storage-service/src/main/resources/file.conf index 29c81842..6c1bebbb 100644 --- a/spring-cloud-alibaba-examples/seata-example/storage-service/src/main/resources/file.conf +++ b/spring-cloud-alibaba-examples/seata-example/storage-service/src/main/resources/file.conf @@ -20,17 +20,26 @@ transport { worker-thread-size = 8 } } +store { + # branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions + max-branch-session-size = 16384 + # globe session size , if exceeded throws exceptions + max-global-session-size = 512 + # file buffer size , if exceeded allocate new buffer + file-write-buffer-cache-size = 16384 + # when recover batch read size + session.reload.read_size = 100 +} service { #vgroup->rgroup - vgroup_mapping.storage-service-fescar-service-group = "localRgroup" + vgroup_mapping.storage-service-fescar-service-group = "default" #only support single node - localRgroup.grouplist = "127.0.0.1:8091" + default.grouplist = "127.0.0.1:8091" #degrade current not support enableDegrade = false #disable disable = false } - client { async.commit.buffer.limit = 10000 lock { diff --git a/spring-cloud-alibaba-examples/seata-example/storage-service/src/main/resources/registry.conf b/spring-cloud-alibaba-examples/seata-example/storage-service/src/main/resources/registry.conf index 8a79c9f2..31bcace5 100644 --- a/spring-cloud-alibaba-examples/seata-example/storage-service/src/main/resources/registry.conf +++ b/spring-cloud-alibaba-examples/seata-example/storage-service/src/main/resources/registry.conf @@ -1,5 +1,5 @@ registry { - # file 、nacos 、redis + # file 、nacos 、eureka、redis、zk、consul type = "file" nacos { @@ -7,17 +7,32 @@ registry { namespace = "public" cluster = "default" } + eureka { + serviceUrl = "http://localhost:1001/eureka" + application = "default" + weight = "1" + } redis { serverAddr = "localhost:6379" db = "0" } + zk { + cluster = "default" + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + } + consul { + cluster = "default" + serverAddr = "127.0.0.1:8500" + } file { name = "file.conf" } } config { - # file nacos apollo + # file、nacos 、apollo、zk type = "file" nacos { @@ -29,7 +44,12 @@ config { app.id = "fescar-server" apollo.meta = "http://192.168.1.204:8801" } + zk { + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + } file { name = "file.conf" } -} \ No newline at end of file +}