diff --git a/.gitignore b/.gitignore index d3ed28dcd7a9f332923492a53382a7b4587edde0..b76e94a1d6b809d11981709b6f1fb964fec89712 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,8 @@ coverage.txt logs/ .vscode/ coverage.txt + +# unit test +remoting/zookeeper/zookeeper-4unittest/ +config_center/zookeeper/zookeeper-4unittest/ +registry/zookeeper/zookeeper-4unittest/ \ No newline at end of file diff --git a/cluster/cluster_impl/failback_cluster_invoker.go b/cluster/cluster_impl/failback_cluster_invoker.go index 027461ccb7f32d6383d756ac986295b6300f249c..c8dbeda09f62e88b51dd4ad2b6b09d5715f0b224 100644 --- a/cluster/cluster_impl/failback_cluster_invoker.go +++ b/cluster/cluster_impl/failback_cluster_invoker.go @@ -18,6 +18,7 @@ package cluster_impl import ( + "strconv" "sync" "time" ) @@ -54,15 +55,18 @@ func newFailbackClusterInvoker(directory cluster.Directory) protocol.Invoker { invoker := &failbackClusterInvoker{ baseClusterInvoker: newBaseClusterInvoker(directory), } - retriesConfig := invoker.GetUrl().GetParamInt(constant.RETRIES_KEY, constant.DEFAULT_FAILBACK_TIMES) - if retriesConfig <= 0 { - retriesConfig = constant.DEFAULT_FAILBACK_TIMES + retriesConfig := invoker.GetUrl().GetParam(constant.RETRIES_KEY, constant.DEFAULT_FAILBACK_TIMES) + retries, err := strconv.Atoi(retriesConfig) + if err != nil || retries < 0 { + logger.Error("Your retries config is invalid,pls do a check. And will use the default fail back times configuration instead.") + retries = constant.DEFAULT_FAILBACK_TIMES_INT } + failbackTasksConfig := invoker.GetUrl().GetParamInt(constant.FAIL_BACK_TASKS_KEY, constant.DEFAULT_FAILBACK_TASKS) if failbackTasksConfig <= 0 { failbackTasksConfig = constant.DEFAULT_FAILBACK_TASKS } - invoker.maxRetries = retriesConfig + invoker.maxRetries = int64(retries) invoker.failbackTasks = failbackTasksConfig return invoker } diff --git a/cluster/cluster_impl/failover_cluster_invoker.go b/cluster/cluster_impl/failover_cluster_invoker.go index 3dd8c41dfb7b7512d7c81fa6d7f8a7c35cec0dcb..70db6d4c1cdf5150d607d6c5250dfb3da631e95a 100644 --- a/cluster/cluster_impl/failover_cluster_invoker.go +++ b/cluster/cluster_impl/failover_cluster_invoker.go @@ -17,6 +17,10 @@ package cluster_impl +import ( + "strconv" +) + import ( perrors "github.com/pkg/errors" ) @@ -24,6 +28,7 @@ import ( import ( "github.com/apache/dubbo-go/cluster" "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/logger" "github.com/apache/dubbo-go/common/utils" "github.com/apache/dubbo-go/protocol" ) @@ -53,16 +58,21 @@ func (invoker *failoverClusterInvoker) Invoke(invocation protocol.Invocation) pr url := invokers[0].GetUrl() //get reties - retries := url.GetParamInt(constant.RETRIES_KEY, constant.DEFAULT_RETRIES) + retriesConfig := url.GetParam(constant.RETRIES_KEY, constant.DEFAULT_RETRIES) //Get the service method loadbalance config if have - if v := url.GetMethodParamInt(methodName, constant.RETRIES_KEY, 0); v != 0 { - retries = v + if v := url.GetMethodParam(methodName, constant.RETRIES_KEY, ""); len(v) != 0 { + retriesConfig = v + } + retries, err := strconv.Atoi(retriesConfig) + if err != nil || retries < 0 { + logger.Error("Your retries config is invalid,pls do a check. And will use the default retries configuration instead.") + retries = constant.DEFAULT_RETRIES_INT } invoked := []protocol.Invoker{} providers := []string{} var result protocol.Result - for i := int64(0); i < retries; i++ { + for i := 0; i <= retries; i++ { //Reselect before retry to avoid a change of candidate `invokers`. //NOTE: if `invokers` changed, then `invoked` also lose accuracy. if i > 0 { diff --git a/cluster/cluster_impl/failover_cluster_test.go b/cluster/cluster_impl/failover_cluster_test.go index dc039db8de41ab6722b20f99c5a0c5536a42a7e6..78b799320dfa58d55e531c658ec5eb0e69306cff 100644 --- a/cluster/cluster_impl/failover_cluster_test.go +++ b/cluster/cluster_impl/failover_cluster_test.go @@ -118,14 +118,14 @@ func normalInvoke(t *testing.T, successCount int, urlParam url.Values, invocatio } func Test_FailoverInvokeSuccess(t *testing.T) { urlParams := url.Values{} - result := normalInvoke(t, 2, urlParams) + result := normalInvoke(t, 3, urlParams) assert.NoError(t, result.Error()) count = 0 } func Test_FailoverInvokeFail(t *testing.T) { urlParams := url.Values{} - result := normalInvoke(t, 3, urlParams) + result := normalInvoke(t, 4, urlParams) assert.Errorf(t, result.Error(), "error") count = 0 } @@ -133,7 +133,7 @@ func Test_FailoverInvokeFail(t *testing.T) { func Test_FailoverInvoke1(t *testing.T) { urlParams := url.Values{} urlParams.Set(constant.RETRIES_KEY, "3") - result := normalInvoke(t, 3, urlParams) + result := normalInvoke(t, 4, urlParams) assert.NoError(t, result.Error()) count = 0 } @@ -144,7 +144,7 @@ func Test_FailoverInvoke2(t *testing.T) { urlParams.Set("methods.test."+constant.RETRIES_KEY, "3") ivc := invocation.NewRPCInvocationWithOptions(invocation.WithMethodName("test")) - result := normalInvoke(t, 3, urlParams, ivc) + result := normalInvoke(t, 4, urlParams, ivc) assert.NoError(t, result.Error()) count = 0 } diff --git a/common/constant/default.go b/common/constant/default.go index d103c6aadc0f76d4c4d82fedb89ea2f21f5eb7aa..541ed1d330db2cf26ce029cd6e2d44ea8d44ce6f 100644 --- a/common/constant/default.go +++ b/common/constant/default.go @@ -26,13 +26,15 @@ const ( ) const ( - DEFAULT_LOADBALANCE = "random" - DEFAULT_RETRIES = 2 - DEFAULT_PROTOCOL = "dubbo" - DEFAULT_REG_TIMEOUT = "10s" - DEFAULT_CLUSTER = "failover" - DEFAULT_FAILBACK_TIMES = 3 - DEFAULT_FAILBACK_TASKS = 100 + DEFAULT_LOADBALANCE = "random" + DEFAULT_RETRIES = "2" + DEFAULT_RETRIES_INT = 2 + DEFAULT_PROTOCOL = "dubbo" + DEFAULT_REG_TIMEOUT = "10s" + DEFAULT_CLUSTER = "failover" + DEFAULT_FAILBACK_TIMES = "3" + DEFAULT_FAILBACK_TIMES_INT = 3 + DEFAULT_FAILBACK_TASKS = 100 ) const ( diff --git a/config/base_config_test.go b/config/base_config_test.go index d07d983f64ed33fcac73f8430737dfb2f01c40c3..7cb18c2c588ce63abafaf629d40b459259080af5 100644 --- a/config/base_config_test.go +++ b/config/base_config_test.go @@ -92,7 +92,7 @@ func Test_refresh(t *testing.T) { Protocol: "mock", Cluster: "failover", Loadbalance: "random", - Retries: 3, + Retries: "3", Group: "huadong_idc", Version: "1.0.0", Methods: []*MethodConfig{ @@ -100,14 +100,14 @@ func Test_refresh(t *testing.T) { InterfaceId: "MockService", InterfaceName: "com.MockService", Name: "GetUser", - Retries: 2, + Retries: "2", Loadbalance: "random", }, { InterfaceId: "MockService", InterfaceName: "com.MockService", Name: "GetUser1", - Retries: 2, + Retries: "2", Loadbalance: "random", }, }, @@ -118,9 +118,9 @@ func Test_refresh(t *testing.T) { c.SetFatherConfig(father) c.fresh() assert.Equal(t, "mock100", father.Registries["shanghai_reg1"].Protocol) - assert.Equal(t, int64(10), father.References["MockService"].Retries) + assert.Equal(t, "10", father.References["MockService"].Retries) - assert.Equal(t, int64(10), father.References["MockService"].Methods[0].Retries) + assert.Equal(t, "10", father.References["MockService"].Methods[0].Retries) assert.Equal(t, &[]bool{false}[0], father.Check) assert.Equal(t, "dubbo", father.ApplicationConfig.Name) } @@ -188,7 +188,7 @@ func Test_refreshProvider(t *testing.T) { Protocol: "mock", Cluster: "failover", Loadbalance: "random", - Retries: 3, + Retries: "3", Group: "huadong_idc", Version: "1.0.0", Methods: []*MethodConfig{ @@ -196,13 +196,13 @@ func Test_refreshProvider(t *testing.T) { InterfaceId: "MockService", InterfaceName: "com.MockService", Name: "GetUser", - Retries: 2, + Retries: "2", Loadbalance: "random", }, {InterfaceId: "MockService", InterfaceName: "com.MockService", Name: "GetUser1", - Retries: 2, + Retries: "2", Loadbalance: "random", }, }, @@ -213,9 +213,9 @@ func Test_refreshProvider(t *testing.T) { c.SetFatherConfig(father) c.fresh() assert.Equal(t, "mock100", father.Registries["shanghai_reg1"].Protocol) - assert.Equal(t, int64(10), father.Services["MockService"].Retries) + assert.Equal(t, "10", father.Services["MockService"].Retries) - assert.Equal(t, int64(10), father.Services["MockService"].Methods[0].Retries) + assert.Equal(t, "10", father.Services["MockService"].Methods[0].Retries) assert.Equal(t, "dubbo", father.ApplicationConfig.Name) assert.Equal(t, "20001", father.Protocols["jsonrpc1"].Port) } diff --git a/config/method_config.go b/config/method_config.go index 95479d1b6586683632ede12e9ce469eb5268fb00..560eaeaefa33f72ac9b6a77ab79474936a9bfc3c 100644 --- a/config/method_config.go +++ b/config/method_config.go @@ -24,7 +24,7 @@ type MethodConfig struct { InterfaceId string InterfaceName string Name string `yaml:"name" json:"name,omitempty" property:"name"` - Retries int64 `yaml:"retries" json:"retries,omitempty" property:"retries"` + Retries string `yaml:"retries" json:"retries,omitempty" property:"retries"` Loadbalance string `yaml:"loadbalance" json:"loadbalance,omitempty" property:"loadbalance"` Weight int64 `yaml:"weight" json:"weight,omitempty" property:"weight"` } diff --git a/config/reference_config.go b/config/reference_config.go index f90e3aabd3a68b8dc7a7509331d301ea3a252f92..1a318a648767582f350eabad7408edd4e11618ef 100644 --- a/config/reference_config.go +++ b/config/reference_config.go @@ -47,7 +47,7 @@ type ReferenceConfig struct { Registry string `yaml:"registry" json:"registry,omitempty" property:"registry"` Cluster string `yaml:"cluster" json:"cluster,omitempty" property:"cluster"` Loadbalance string `yaml:"loadbalance" json:"loadbalance,omitempty" property:"loadbalance"` - Retries int64 `yaml:"retries" json:"retries,omitempty" property:"retries"` + Retries string `yaml:"retries" json:"retries,omitempty" property:"retries"` Group string `yaml:"group" json:"group,omitempty" property:"group"` Version string `yaml:"version" json:"version,omitempty" property:"version"` Methods []*MethodConfig `yaml:"methods" json:"methods,omitempty" property:"methods"` @@ -154,7 +154,7 @@ func (refconfig *ReferenceConfig) getUrlMap() url.Values { urlMap.Set(constant.TIMESTAMP_KEY, strconv.FormatInt(time.Now().Unix(), 10)) urlMap.Set(constant.CLUSTER_KEY, refconfig.Cluster) urlMap.Set(constant.LOADBALANCE_KEY, refconfig.Loadbalance) - urlMap.Set(constant.RETRIES_KEY, strconv.FormatInt(refconfig.Retries, 10)) + urlMap.Set(constant.RETRIES_KEY, refconfig.Retries) urlMap.Set(constant.GROUP_KEY, refconfig.Group) urlMap.Set(constant.VERSION_KEY, refconfig.Version) urlMap.Set(constant.GENERIC_KEY, strconv.FormatBool(refconfig.Generic)) @@ -180,7 +180,7 @@ func (refconfig *ReferenceConfig) getUrlMap() url.Values { for _, v := range refconfig.Methods { urlMap.Set("methods."+v.Name+"."+constant.LOADBALANCE_KEY, v.Loadbalance) - urlMap.Set("methods."+v.Name+"."+constant.RETRIES_KEY, strconv.FormatInt(v.Retries, 10)) + urlMap.Set("methods."+v.Name+"."+constant.RETRIES_KEY, v.Retries) } return urlMap diff --git a/config/reference_config_test.go b/config/reference_config_test.go index d36fa04d7461cfb6cd4c9d2d739e9863355df077..cbe5c4cd65f91b1e44096afdde0a2658b2af3a10 100644 --- a/config/reference_config_test.go +++ b/config/reference_config_test.go @@ -90,18 +90,18 @@ func doInit() { Protocol: "mock", Cluster: "failover", Loadbalance: "random", - Retries: 3, + Retries: "3", Group: "huadong_idc", Version: "1.0.0", Methods: []*MethodConfig{ { Name: "GetUser", - Retries: 2, + Retries: "2", Loadbalance: "random", }, { Name: "GetUser1", - Retries: 2, + Retries: "2", Loadbalance: "random", }, }, diff --git a/config/service_config.go b/config/service_config.go index 8b4a7d1b2251be206085a54a8676944aa3158609..5f08681838d6f1dc8e682a17d114d07a02de0960 100644 --- a/config/service_config.go +++ b/config/service_config.go @@ -54,7 +54,7 @@ type ServiceConfig struct { Version string `yaml:"version" json:"version,omitempty" property:"version" ` Methods []*MethodConfig `yaml:"methods" json:"methods,omitempty" property:"methods"` Warmup string `yaml:"warmup" json:"warmup,omitempty" property:"warmup"` - Retries int64 `yaml:"retries" json:"retries,omitempty" property:"retries"` + Retries string `yaml:"retries" json:"retries,omitempty" property:"retries"` Params map[string]string `yaml:"params" json:"params,omitempty" property:"params"` unexported *atomic.Bool exported *atomic.Bool @@ -160,7 +160,7 @@ func (srvconfig *ServiceConfig) getUrlMap() url.Values { urlMap.Set(constant.CLUSTER_KEY, srvconfig.Cluster) urlMap.Set(constant.LOADBALANCE_KEY, srvconfig.Loadbalance) urlMap.Set(constant.WARMUP_KEY, srvconfig.Warmup) - urlMap.Set(constant.RETRIES_KEY, strconv.FormatInt(srvconfig.Retries, 10)) + urlMap.Set(constant.RETRIES_KEY, srvconfig.Retries) urlMap.Set(constant.GROUP_KEY, srvconfig.Group) urlMap.Set(constant.VERSION_KEY, srvconfig.Version) urlMap.Set(constant.ROLE_KEY, strconv.Itoa(common.PROVIDER)) @@ -178,7 +178,7 @@ func (srvconfig *ServiceConfig) getUrlMap() url.Values { for _, v := range srvconfig.Methods { urlMap.Set("methods."+v.Name+"."+constant.LOADBALANCE_KEY, v.Loadbalance) - urlMap.Set("methods."+v.Name+"."+constant.RETRIES_KEY, strconv.FormatInt(v.Retries, 10)) + urlMap.Set("methods."+v.Name+"."+constant.RETRIES_KEY, v.Retries) urlMap.Set("methods."+v.Name+"."+constant.WEIGHT_KEY, strconv.FormatInt(v.Weight, 10)) } diff --git a/config/service_config_test.go b/config/service_config_test.go index e111c8d110a14a039f3ab1a6c14f8044847f87e5..bfbe9134fd670b963abc88637a5c4aefa460d3bc 100644 --- a/config/service_config_test.go +++ b/config/service_config_test.go @@ -79,19 +79,19 @@ func doinit() { Registry: "shanghai_reg1,shanghai_reg2,hangzhou_reg1,hangzhou_reg2", Cluster: "failover", Loadbalance: "random", - Retries: 3, + Retries: "3", Group: "huadong_idc", Version: "1.0.0", Methods: []*MethodConfig{ { Name: "GetUser", - Retries: 2, + Retries: "2", Loadbalance: "random", Weight: 200, }, { Name: "GetUser1", - Retries: 2, + Retries: "2", Loadbalance: "random", Weight: 200, }, diff --git a/config/testdata/consumer_config.yml b/config/testdata/consumer_config.yml index 372873abbb258e03acfe8e9e00d03aa2f77fb9a9..459edd98267e4503c5460057286016e3150c7327 100644 --- a/config/testdata/consumer_config.yml +++ b/config/testdata/consumer_config.yml @@ -43,7 +43,7 @@ references: cluster: "failover" methods : - name: "GetUser" - retries: 3 + retries: "3" params: "serviceid": "soa.com.ikurento.user.UserProvider" diff --git a/config/testdata/consumer_config_with_configcenter.yml b/config/testdata/consumer_config_with_configcenter.yml index c6505e4492887cc6602ab0b2ee9a9fbd9fdce9c9..69df73f51faedf7cba5d7c2c5ef605f47d67c887 100644 --- a/config/testdata/consumer_config_with_configcenter.yml +++ b/config/testdata/consumer_config_with_configcenter.yml @@ -13,7 +13,7 @@ references: cluster: "failover" methods : - name: "GetUser" - retries: 3 + retries: "3" protocol_conf: dubbo: diff --git a/examples/configcenter/zookeeper/dubbo/with-configcenter-go-client/profiles/dev/client.yml b/examples/configcenter/zookeeper/dubbo/with-configcenter-go-client/profiles/dev/client.yml index c8e7bd0b053f797f3a5320451f08dcc590832330..48b7b0ce95f11f21f1c94095c3c4fea3c4232f9d 100644 --- a/examples/configcenter/zookeeper/dubbo/with-configcenter-go-client/profiles/dev/client.yml +++ b/examples/configcenter/zookeeper/dubbo/with-configcenter-go-client/profiles/dev/client.yml @@ -13,7 +13,7 @@ references: cluster: "failover" methods : - name: "GetUser" - retries: 3 + retries: "3" protocol_conf: dubbo: diff --git a/examples/configcenter/zookeeper/dubbo/with-configcenter-go-client/profiles/release/client.yml b/examples/configcenter/zookeeper/dubbo/with-configcenter-go-client/profiles/release/client.yml index c8e7bd0b053f797f3a5320451f08dcc590832330..48b7b0ce95f11f21f1c94095c3c4fea3c4232f9d 100644 --- a/examples/configcenter/zookeeper/dubbo/with-configcenter-go-client/profiles/release/client.yml +++ b/examples/configcenter/zookeeper/dubbo/with-configcenter-go-client/profiles/release/client.yml @@ -13,7 +13,7 @@ references: cluster: "failover" methods : - name: "GetUser" - retries: 3 + retries: "3" protocol_conf: dubbo: diff --git a/examples/configcenter/zookeeper/dubbo/with-configcenter-go-client/profiles/test/client.yml b/examples/configcenter/zookeeper/dubbo/with-configcenter-go-client/profiles/test/client.yml index c8e7bd0b053f797f3a5320451f08dcc590832330..48b7b0ce95f11f21f1c94095c3c4fea3c4232f9d 100644 --- a/examples/configcenter/zookeeper/dubbo/with-configcenter-go-client/profiles/test/client.yml +++ b/examples/configcenter/zookeeper/dubbo/with-configcenter-go-client/profiles/test/client.yml @@ -13,7 +13,7 @@ references: cluster: "failover" methods : - name: "GetUser" - retries: 3 + retries: "3" protocol_conf: dubbo: diff --git a/examples/configcenter/zookeeper/dubbo/with-configcenter-go-server/profiles/dev/server.yml b/examples/configcenter/zookeeper/dubbo/with-configcenter-go-server/profiles/dev/server.yml index cdaaca4c3803cf6126f00d67631dd1507d14505c..219b92aebf1262dbbccf6291301387447589e500 100644 --- a/examples/configcenter/zookeeper/dubbo/with-configcenter-go-server/profiles/dev/server.yml +++ b/examples/configcenter/zookeeper/dubbo/with-configcenter-go-server/profiles/dev/server.yml @@ -17,7 +17,7 @@ services: cluster: "failover" methods: - name: "GetUser" - retries: 1 + retries: "1" loadbalance: "random" protocol_conf: diff --git a/examples/configcenter/zookeeper/dubbo/with-configcenter-go-server/profiles/release/server.yml b/examples/configcenter/zookeeper/dubbo/with-configcenter-go-server/profiles/release/server.yml index cdaaca4c3803cf6126f00d67631dd1507d14505c..219b92aebf1262dbbccf6291301387447589e500 100644 --- a/examples/configcenter/zookeeper/dubbo/with-configcenter-go-server/profiles/release/server.yml +++ b/examples/configcenter/zookeeper/dubbo/with-configcenter-go-server/profiles/release/server.yml @@ -17,7 +17,7 @@ services: cluster: "failover" methods: - name: "GetUser" - retries: 1 + retries: "1" loadbalance: "random" protocol_conf: diff --git a/examples/configcenter/zookeeper/dubbo/with-configcenter-go-server/profiles/test/server.yml b/examples/configcenter/zookeeper/dubbo/with-configcenter-go-server/profiles/test/server.yml index cdaaca4c3803cf6126f00d67631dd1507d14505c..219b92aebf1262dbbccf6291301387447589e500 100644 --- a/examples/configcenter/zookeeper/dubbo/with-configcenter-go-server/profiles/test/server.yml +++ b/examples/configcenter/zookeeper/dubbo/with-configcenter-go-server/profiles/test/server.yml @@ -17,7 +17,7 @@ services: cluster: "failover" methods: - name: "GetUser" - retries: 1 + retries: "1" loadbalance: "random" protocol_conf: diff --git a/examples/consul/go-client/config/client.yml b/examples/consul/go-client/config/client.yml index 8a7458c384bc80b5096aa1b3496f9f1430753a07..4c0acde0d58eb5c8134b0e3d38242928822a9723 100644 --- a/examples/consul/go-client/config/client.yml +++ b/examples/consul/go-client/config/client.yml @@ -21,7 +21,7 @@ references: cluster: "failover" methods : - name: "SayHello" - retries: 3 + retries: "3" protocol_conf: dubbo: diff --git a/examples/consul/go-server/config/server.yml b/examples/consul/go-server/config/server.yml index c12800e68d1c32793cb6860561f3240f196a6a78..aa105327f87b9f6d08069480c580a77a7710809c 100644 --- a/examples/consul/go-server/config/server.yml +++ b/examples/consul/go-server/config/server.yml @@ -23,7 +23,7 @@ services: cluster: "failover" methods: - name: "SayHello" - retries: 1 + retries: "1" loadbalance: "random" protocols: diff --git a/examples/general/dubbo/go-client/profiles/dev/client.yml b/examples/general/dubbo/go-client/profiles/dev/client.yml index ff696688416dc1e77f87d7831922894979d78da2..4c2ad17cb31a47f9fcc2726975f78ad6f04c4ed7 100644 --- a/examples/general/dubbo/go-client/profiles/dev/client.yml +++ b/examples/general/dubbo/go-client/profiles/dev/client.yml @@ -39,7 +39,7 @@ references: cluster: "failover" methods : - name: "GetUser" - retries: 3 + retries: "3" "UserProvider1": registry: "hangzhouzk" protocol: "dubbo" @@ -48,7 +48,7 @@ references: cluster: "failover" methods: - name: "GetUser" - retries: 3 + retries: "3" "UserProvider2": registry: "hangzhouzk" protocol: "dubbo" @@ -58,7 +58,7 @@ references: cluster: "failover" methods: - name: "GetUser" - retries: 3 + retries: "3" protocol_conf: dubbo: diff --git a/examples/general/dubbo/go-client/profiles/release/client.yml b/examples/general/dubbo/go-client/profiles/release/client.yml index b4d897fda2b78e30dd912eab9f5a43bbcef9f595..6b45f44077e631ec49f937f540333be24eb328c9 100644 --- a/examples/general/dubbo/go-client/profiles/release/client.yml +++ b/examples/general/dubbo/go-client/profiles/release/client.yml @@ -39,7 +39,7 @@ references: cluster: "failover" methods : - name: "GetUser" - retries: 3 + retries: "3" "UserProvider1": registry: "hangzhouzk" protocol: "dubbo" @@ -48,7 +48,7 @@ references: cluster: "failover" methods: - name: "GetUser" - retries: 3 + retries: "3" "UserProvider2": registry: "hangzhouzk" protocol: "dubbo" @@ -58,7 +58,7 @@ references: cluster: "failover" methods: - name: "GetUser" - retries: 3 + retries: "3" protocol_conf: dubbo: diff --git a/examples/general/dubbo/go-client/profiles/test/client.yml b/examples/general/dubbo/go-client/profiles/test/client.yml index c8b5c58691a0b35b55adb8f27cd1108433655b45..a9ebe3bb31726bc50bc83796e0029a253e6f0a7e 100644 --- a/examples/general/dubbo/go-client/profiles/test/client.yml +++ b/examples/general/dubbo/go-client/profiles/test/client.yml @@ -39,7 +39,7 @@ references: cluster: "failover" methods : - name: "GetUser" - retries: 3 + retries: "3" "UserProvider1": registry: "hangzhouzk" protocol: "dubbo" @@ -48,7 +48,7 @@ references: cluster: "failover" methods: - name: "GetUser" - retries: 3 + retries: "3" "UserProvider2": registry: "hangzhouzk" protocol: "dubbo" @@ -58,7 +58,7 @@ references: cluster: "failover" methods: - name: "GetUser" - retries: 3 + retries: "3" protocol_conf: dubbo: diff --git a/examples/general/dubbo/go-server/profiles/dev/server.yml b/examples/general/dubbo/go-server/profiles/dev/server.yml index 79c2cb2cc22a1b626a631009a0a4c6f29a8f9127..576a944754155a367af4ccb3d694362854fea2b9 100644 --- a/examples/general/dubbo/go-server/profiles/dev/server.yml +++ b/examples/general/dubbo/go-server/profiles/dev/server.yml @@ -38,7 +38,7 @@ services: cluster: "failover" methods: - name: "GetUser" - retries: 1 + retries: "1" loadbalance: "random" "UserProvider1": registry: "hangzhouzk" @@ -50,7 +50,7 @@ services: cluster: "failover" methods: - name: "GetUser" - retries: 1 + retries: "1" loadbalance: "random" "UserProvider2": registry: "hangzhouzk" @@ -63,7 +63,7 @@ services: cluster: "failover" methods: - name: "GetUser" - retries: 1 + retries: "1" loadbalance: "random" protocols: diff --git a/examples/general/dubbo/go-server/profiles/release/server.yml b/examples/general/dubbo/go-server/profiles/release/server.yml index 6890ed3bdb5048b02578ca8eba1620464378463c..dc3bc00276a41da698ec2174e9a31b43114c41d4 100644 --- a/examples/general/dubbo/go-server/profiles/release/server.yml +++ b/examples/general/dubbo/go-server/profiles/release/server.yml @@ -37,7 +37,7 @@ services: cluster: "failover" methods: - name: "GetUser" - retries: 1 + retries: "1" loadbalance: "random" "UserProvider1": registry: "hangzhouzk" @@ -49,7 +49,7 @@ services: cluster: "failover" methods: - name: "GetUser" - retries: 1 + retries: "1" loadbalance: "random" "UserProvider2": registry: "hangzhouzk" @@ -62,7 +62,7 @@ services: cluster: "failover" methods: - name: "GetUser" - retries: 1 + retries: "1" loadbalance: "random" protocols: diff --git a/examples/general/dubbo/go-server/profiles/test/server.yml b/examples/general/dubbo/go-server/profiles/test/server.yml index b6dd41da448d7531a3c5f4f24a8f460e5d1775bc..0aab159b150a44aa4233e4d17925857ccd01e9da 100644 --- a/examples/general/dubbo/go-server/profiles/test/server.yml +++ b/examples/general/dubbo/go-server/profiles/test/server.yml @@ -37,7 +37,7 @@ services: cluster: "failover" methods: - name: "GetUser" - retries: 1 + retries: "1" loadbalance: "random" "UserProvider1": registry: "hangzhouzk" @@ -49,7 +49,7 @@ services: cluster: "failover" methods: - name: "GetUser" - retries: 1 + retries: "1" loadbalance: "random" "UserProvider2": registry: "hangzhouzk" @@ -62,7 +62,7 @@ services: cluster: "failover" methods: - name: "GetUser" - retries: 1 + retries: "1" loadbalance: "random" protocols: diff --git a/examples/general/jsonrpc/go-client/profiles/dev/client.yml b/examples/general/jsonrpc/go-client/profiles/dev/client.yml index 788e06eecd6014eefaf12913b6394e5e0a95efdf..8d2482f1b43fd4555ed3a63b6d4588ccf6c906f5 100644 --- a/examples/general/jsonrpc/go-client/profiles/dev/client.yml +++ b/examples/general/jsonrpc/go-client/profiles/dev/client.yml @@ -38,7 +38,7 @@ references: cluster: "failover" methods : - name: "GetUser" - retries: 3 + retries: "3" "UserProvider1": registry: "hangzhouzk" protocol: "jsonrpc" @@ -47,7 +47,7 @@ references: cluster: "failover" methods: - name: "GetUser" - retries: 3 + retries: "3" "UserProvider2": registry: "hangzhouzk" protocol: "jsonrpc" @@ -57,4 +57,4 @@ references: cluster: "failover" methods: - name: "GetUser" - retries: 3 + retries: "3" diff --git a/examples/general/jsonrpc/go-server/profiles/dev/server.yml b/examples/general/jsonrpc/go-server/profiles/dev/server.yml index 4d74d2ef6fed9b0206729717d7b7081a3eadec96..10a0898b26a91c6a164e7341fb2646c5652d557a 100644 --- a/examples/general/jsonrpc/go-server/profiles/dev/server.yml +++ b/examples/general/jsonrpc/go-server/profiles/dev/server.yml @@ -36,7 +36,7 @@ services: cluster: "failover" methods: - name: "GetUser" - retries: 1 + retries: "1" loadbalance: "random" "UserProvider1": registry: "hangzhouzk" @@ -48,7 +48,7 @@ services: cluster: "failover" methods: - name: "GetUser" - retries: 1 + retries: "1" loadbalance: "random" "UserProvider2": registry: "hangzhouzk" @@ -61,7 +61,7 @@ services: cluster: "failover" methods: - name: "GetUser" - retries: 1 + retries: "1" loadbalance: "random" protocols: diff --git a/examples/helloworld/dubbo/go-client/profiles/dev/client.yml b/examples/helloworld/dubbo/go-client/profiles/dev/client.yml index fed05b09734c41ef7b53ad2d88a953f997d50735..226fbddd1a82c64748bbe51b9ec2289743b265a8 100644 --- a/examples/helloworld/dubbo/go-client/profiles/dev/client.yml +++ b/examples/helloworld/dubbo/go-client/profiles/dev/client.yml @@ -34,7 +34,7 @@ references: cluster: "failover" methods : - name: "GetUser" - retries: 3 + retries: "3" protocol_conf: diff --git a/examples/helloworld/dubbo/go-server/profiles/dev/server.yml b/examples/helloworld/dubbo/go-server/profiles/dev/server.yml index be7eedeaa3fd186f4cd2ea264b31429165e55bf1..7df17934f6e844d8e24d52f82c716b71eb6f955a 100644 --- a/examples/helloworld/dubbo/go-server/profiles/dev/server.yml +++ b/examples/helloworld/dubbo/go-server/profiles/dev/server.yml @@ -28,7 +28,7 @@ services: cluster: "failover" methods: - name: "GetUser" - retries: 1 + retries: "1" loadbalance: "random" protocols: diff --git a/examples/hystrixfilter/dubbo/with-hystrix-go-client/profiles/dev/client.yml b/examples/hystrixfilter/dubbo/with-hystrix-go-client/profiles/dev/client.yml index 5b5003fb2cabde05e7d99e738afd584a635355bd..4a438cc95371973ba036b1ffed8576948451fd5d 100644 --- a/examples/hystrixfilter/dubbo/with-hystrix-go-client/profiles/dev/client.yml +++ b/examples/hystrixfilter/dubbo/with-hystrix-go-client/profiles/dev/client.yml @@ -41,7 +41,7 @@ references: cluster: "failover" methods : - name: "GetUser" - retries: 3 + retries: "3" protocol_conf: dubbo: