From 7f3f12dc09fe6b20fb49727093be5d90644a40ff Mon Sep 17 00:00:00 2001 From: slievrly Date: Mon, 19 Feb 2024 12:10:47 +0800 Subject: [PATCH] optimize: remove enableDegrade properties --- changes/en-us/2.x.md | 1 + changes/zh-cn/2.x.md | 1 + .../org/apache/seata/common/ConfigurationKeys.java | 5 ----- script/client/conf/file.conf | 2 -- script/client/spring/application.properties | 1 - script/client/spring/application.yml | 1 - script/config-center/config.txt | 1 - .../properties/client/ServiceProperties.java | 14 +------------- .../boot/autoconfigure/ClientPropertiesTest.java | 1 - 9 files changed, 3 insertions(+), 24 deletions(-) diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md index dca04c4a4a8..b5e279a962e 100644 --- a/changes/en-us/2.x.md +++ b/changes/en-us/2.x.md @@ -97,6 +97,7 @@ Add changes here for all PR submitted to the 2.x branch. - [[#6144](https://github.com/apache/incubator-seata/pull/6144)] upgrade nacos client to 1.4.6 - [[#6147](https://github.com/apache/incubator-seata/pull/6147)] upgrade kafka-clients to 3.6.1 - [[#6340](https://github.com/apache/incubator-seata/pull/6340)] upgrade and tidy some dependencies +- [[#6350](https://github.com/apache/incubator-seata/pull/6350)] remove enableDegrade properties ### test: - [[#6081](https://github.com/apache/incubator-seata/pull/6081)] add `test-os.yml` for testing the OS diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md index 90b586ecb70..07ff7b303f4 100644 --- a/changes/zh-cn/2.x.md +++ b/changes/zh-cn/2.x.md @@ -96,6 +96,7 @@ - [[#6145](https://github.com/apache/incubator-seata/pull/6145)] 升级 jettison依赖版本至1.5.4 - [[#6147](https://github.com/apache/incubator-seata/pull/6147)] 升级 kafka-clients依赖至3.6.1 - [[#6340](https://github.com/apache/incubator-seata/pull/6340)] 升级和整理依赖 +- [[#6350](https://github.com/apache/incubator-seata/pull/6350)] 移除 enableDegrade 配置 ### test: - [[#6081](https://github.com/apache/incubator-seata/pull/6081)] 添加 `test-os.yml` 用于测试seata在各种操作系统下的运行情况 diff --git a/common/src/main/java/org/apache/seata/common/ConfigurationKeys.java b/common/src/main/java/org/apache/seata/common/ConfigurationKeys.java index dd0ceb841f2..7e6521c5ab5 100644 --- a/common/src/main/java/org/apache/seata/common/ConfigurationKeys.java +++ b/common/src/main/java/org/apache/seata/common/ConfigurationKeys.java @@ -151,11 +151,6 @@ public interface ConfigurationKeys { */ String SERVER_NODE_SPLIT_CHAR = System.getProperty("line.separator"); - /** - * The constant ENABLE_DEGRADE_POSTFIX. - */ - String ENABLE_DEGRADE_POSTFIX = "enableDegrade"; - /** * The constant CLIENT_PREFIX. */ diff --git a/script/client/conf/file.conf b/script/client/conf/file.conf index 8a076b33349..92c836e17a6 100644 --- a/script/client/conf/file.conf +++ b/script/client/conf/file.conf @@ -58,8 +58,6 @@ service { vgroupMapping.default_tx_group = "default" #only support when registry.type=file, please don't set multiple addresses default.grouplist = "127.0.0.1:8091" - #degrade, current not support - enableDegrade = false #disable seata disableGlobalTransaction = false } diff --git a/script/client/spring/application.properties b/script/client/spring/application.properties index a3d6456e37b..eddf85d6174 100755 --- a/script/client/spring/application.properties +++ b/script/client/spring/application.properties @@ -62,7 +62,6 @@ seata.client.load-balance.virtual-nodes=10 seata.log.exception-rate=100 seata.service.vgroup-mapping.default_tx_group=default seata.service.grouplist.default=127.0.0.1:8091 -seata.service.enable-degrade=false seata.service.disable-global-transaction=false seata.transport.shutdown.wait=3 seata.transport.thread-factory.boss-thread-prefix=NettyBoss diff --git a/script/client/spring/application.yml b/script/client/spring/application.yml index 7bb002cdf6a..6034f5a653f 100755 --- a/script/client/spring/application.yml +++ b/script/client/spring/application.yml @@ -70,7 +70,6 @@ seata: default_tx_group: default grouplist: default: 127.0.0.1:8091 - enable-degrade: false disable-global-transaction: false transport: shutdown: diff --git a/script/config-center/config.txt b/script/config-center/config.txt index 0b62de08c4d..9c2ae1c9de1 100644 --- a/script/config-center/config.txt +++ b/script/config-center/config.txt @@ -26,7 +26,6 @@ transport.compressor=none service.vgroupMapping.default_tx_group=default #If you use a registry, you can ignore it service.default.grouplist=127.0.0.1:8091 -service.enableDegrade=false service.disableGlobalTransaction=false client.metadataMaxAgeMs=30000 diff --git a/seata-spring-autoconfigure/seata-spring-autoconfigure-client/src/main/java/org/apache/seata/spring/boot/autoconfigure/properties/client/ServiceProperties.java b/seata-spring-autoconfigure/seata-spring-autoconfigure-client/src/main/java/org/apache/seata/spring/boot/autoconfigure/properties/client/ServiceProperties.java index af4865fcf71..f3afd9ace27 100644 --- a/seata-spring-autoconfigure/seata-spring-autoconfigure-client/src/main/java/org/apache/seata/spring/boot/autoconfigure/properties/client/ServiceProperties.java +++ b/seata-spring-autoconfigure/seata-spring-autoconfigure-client/src/main/java/org/apache/seata/spring/boot/autoconfigure/properties/client/ServiceProperties.java @@ -42,10 +42,7 @@ public class ServiceProperties implements InitializingBean { * group list */ private Map grouplist = new HashMap<>(); - /** - * degrade current not support - */ - private boolean enableDegrade = false; + /** * disable globalTransaction */ @@ -67,15 +64,6 @@ public void setGrouplist(Map grouplist) { this.grouplist = grouplist; } - public boolean isEnableDegrade() { - return enableDegrade; - } - - public ServiceProperties setEnableDegrade(boolean enableDegrade) { - this.enableDegrade = enableDegrade; - return this; - } - public boolean isDisableGlobalTransaction() { return disableGlobalTransaction; } diff --git a/seata-spring-autoconfigure/seata-spring-autoconfigure-client/src/test/java/org/apache/seata/spring/boot/autoconfigure/ClientPropertiesTest.java b/seata-spring-autoconfigure/seata-spring-autoconfigure-client/src/test/java/org/apache/seata/spring/boot/autoconfigure/ClientPropertiesTest.java index 31dedd13a76..03049711a32 100644 --- a/seata-spring-autoconfigure/seata-spring-autoconfigure-client/src/test/java/org/apache/seata/spring/boot/autoconfigure/ClientPropertiesTest.java +++ b/seata-spring-autoconfigure/seata-spring-autoconfigure-client/src/test/java/org/apache/seata/spring/boot/autoconfigure/ClientPropertiesTest.java @@ -87,7 +87,6 @@ public void testServiceProperties() { Map grouplist = serviceProperties.getGrouplist(); assertEquals("default", vgroupMapping.get(DEFAULT_TX_GROUP)); assertEquals("127.0.0.1:8091", grouplist.get("default")); - assertFalse(serviceProperties.isEnableDegrade()); assertFalse(serviceProperties.isDisableGlobalTransaction()); }