diff --git a/console/src/main/resources/static/console-fe/src/locales/en-US.js b/console/src/main/resources/static/console-fe/src/locales/en-US.js index 7ab529a80..662113da5 100644 --- a/console/src/main/resources/static/console-fe/src/locales/en-US.js +++ b/console/src/main/resources/static/console-fe/src/locales/en-US.js @@ -101,7 +101,7 @@ const I18N_CONF = { columnClusterCount: 'Cluster Count', columnIpCount: 'Instance Count', columnHealthyInstanceCount: 'Healthy Instance Count', - columnTriggerFlag: 'Trigger Flag', + columnTriggerFlag: 'Trigger Protection Threshold', operation: 'Operation', detail: 'Details', sampleCode: 'Code Example', diff --git a/console/src/main/resources/static/console-fe/src/locales/zh-CN.js b/console/src/main/resources/static/console-fe/src/locales/zh-CN.js index c2fd5cec3..27a061b90 100644 --- a/console/src/main/resources/static/console-fe/src/locales/zh-CN.js +++ b/console/src/main/resources/static/console-fe/src/locales/zh-CN.js @@ -101,7 +101,7 @@ const I18N_CONF = { columnClusterCount: '集群数目', columnIpCount: '实例数', columnHealthyInstanceCount: '健康实例数', - columnTriggerFlag: '触发阈值', + columnTriggerFlag: '触发保护阈值', operation: '操作', detail: '详情', sampleCode: '示例代码', diff --git a/naming/src/main/java/com/alibaba/nacos/naming/core/Service.java b/naming/src/main/java/com/alibaba/nacos/naming/core/Service.java index b4956b32e..779a9e1f5 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/core/Service.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/core/Service.java @@ -192,15 +192,7 @@ public class Service extends com.alibaba.nacos.api.naming.pojo.Service implement } public boolean triggerFlag() { - if(0 == healthyInstanceCount()) { - return true; - } - Float compareValue = 0.0F; - if(Float.floatToIntBits(compareValue) == getProtectThreshold()) { - return false; - } - boolean triggerFlag = (healthyInstanceCount() * 1.0 / allIPs().size()) <= getProtectThreshold(); - return triggerFlag; + return (healthyInstanceCount() * 1.0 / allIPs().size()) <= getProtectThreshold(); } public void updateIPs(Collection instances, boolean ephemeral) {