diff --git a/cluster/router/healthcheck/health_check_route.go b/cluster/router/healthcheck/health_check_route.go index 06eea3b937fdc9fbc2391680cd77c2d86091371f..3a973193a58f42b91a81b1645fcc0f6efd90eea7 100644 --- a/cluster/router/healthcheck/health_check_route.go +++ b/cluster/router/healthcheck/health_check_route.go @@ -80,7 +80,7 @@ func (r *HealthCheckRouter) Pool(invokers []protocol.Invoker) (router.AddrPool, return nil, nil } - rb := make(router.AddrPool) + rb := make(router.AddrPool, 8) rb[healthy] = roaring.NewBitmap() for i, invoker := range invokers { if r.checker.IsHealthy(invoker) { diff --git a/cluster/router/tag/tag_router.go b/cluster/router/tag/tag_router.go index 5f0ff0a17baeec0c1241e8663697bf02d9209c7d..8f3a3c55f6f5cc25fb2f431cba1439c9ea4646ab 100644 --- a/cluster/router/tag/tag_router.go +++ b/cluster/router/tag/tag_router.go @@ -97,7 +97,7 @@ func (c *tagRouter) Priority() int64 { // Pool divided invokers into different address pool by tag. func (c *tagRouter) Pool(invokers []protocol.Invoker) (router.AddrPool, router.AddrMetadata) { - rb := make(router.AddrPool) + rb := make(router.AddrPool, 8) for i, invoker := range invokers { url := invoker.GetUrl() tag := url.GetParam(constant.Tagkey, "")