You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/11/18 15:05:37 UTC

[GitHub] [dubbo-go] Mulavar opened a new issue #1597: if we enabled tps limiter, it may cause panic if we do not config it rightly.

Mulavar opened a new issue #1597:
URL: https://github.com/apache/dubbo-go/issues/1597


   <!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!
   
   -->
   
   
   **What happened**:
   in `filter/tps/limiter/method_service.go#getLimitConfig, it has the code following:
   ```go
   if len(methodLevelConfig) > 0 {
       result, err := strconv.ParseInt(methodLevelConfig, 0, 0)
       if err != nil {
   	panic(fmt.Sprintf("The %s for invocation %s # %s must be positive, please check your configuration!",
   		configKey, url.ServiceKey(), invocation.MethodName()))
   }
   ```
   return result
   }
   If we try to use tps limiter and we do not config it rightly, it will successfully start, and then panic when we try to invoke the service. I think  it should be  fixed for the following reasons:
   1. config error should be checked at the beginning, if we do not config the system rightly, the service should not start successfully.
   2. tps limiter is used in a few cases, and when we enable it, what we want to do is make the system as available as possible,  if we do not config it rightly, we also should make sure that the system will run normally.
   
   **What you expected to happen**:
   1. when we start the service, check the params if they are right. If not, panic.
   2. delete panic and take a error log for notice.
   
   **How to reproduce it (as minimally and precisely as possible)**:
   
   **Anything else we need to know?**:
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org