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/09/07 12:40:26 UTC

[GitHub] [dubbo] changfubai opened a new issue #8715: failback负载模式下,设置重试次数为0,依旧会重试一次

changfubai opened a new issue #8715:
URL: https://github.com/apache/dubbo/issues/8715


   - [X] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   - [X] I have checked the [FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: 2.7/3.0
   * Operating System version: ==
   * Java version: 1.8
   
   ### Steps to reproduce this issue
   
   review代码时发现failback模式下的retries判断有问题。
   
   ![image](https://user-images.githubusercontent.com/20989201/132345804-6705a962-3e32-45b3-b905-c3deda7aee24.png)
   调用失败时,没有判断重试次数,就直接加到了timer中。
   ![image](https://user-images.githubusercontent.com/20989201/132345873-8d6d01e6-488a-4317-87ca-33bb27caeec2.png)
   
   timer中执行时,如果抛出异常,才判断如果超过重试次数,不继续进行。
   ![image](https://user-images.githubusercontent.com/20989201/132345990-3a4cfa0c-870b-4625-bfa1-2bf3916abb15.png)
   
   
   Pls. provide [GitHub address] to reproduce this issue.
   
   ### Expected Result
   
   加到timer中之前就需要判断一次retries
   
   ### Actual Result
   
   What actually happens?
   
   If there is an exception, please attach the exception trace:
   
   ```
   Just put your stack trace here!
   ```
   


-- 
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


[GitHub] [dubbo] 283883031 commented on issue #8715: failback容错模式下,设置重试次数为0,依旧会重试一次

Posted by GitBox <gi...@apache.org>.
283883031 commented on issue #8715:
URL: https://github.com/apache/dubbo/issues/8715#issuecomment-1020882047


   > 
   
   ok


-- 
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


[GitHub] [dubbo] 283883031 edited a comment on issue #8715: failback负载模式下,设置重试次数为0,依旧会重试一次

Posted by GitBox <gi...@apache.org>.
283883031 edited a comment on issue #8715:
URL: https://github.com/apache/dubbo/issues/8715#issuecomment-1004616208


   ```
    public FailbackClusterInvoker(Directory<T> directory) {
           super(directory);
   
           int retriesConfig = getUrl().getParameter(RETRIES_KEY, DEFAULT_FAILBACK_TIMES);
           if (retriesConfig <= 0) {
               retriesConfig = DEFAULT_FAILBACK_TIMES;
           }
           int failbackTasksConfig = getUrl().getParameter(FAIL_BACK_TASKS_KEY, DEFAULT_FAILBACK_TASKS);
           if (failbackTasksConfig <= 0) {
               failbackTasksConfig = DEFAULT_FAILBACK_TASKS;
           }
           retries = retriesConfig;
           failbackTasks = failbackTasksConfig;
       }
   ```


-- 
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


[GitHub] [dubbo] 283883031 commented on issue #8715: failback负载模式下,设置重试次数为0,依旧会重试一次

Posted by GitBox <gi...@apache.org>.
283883031 commented on issue #8715:
URL: https://github.com/apache/dubbo/issues/8715#issuecomment-1004616208


    public FailbackClusterInvoker(Directory<T> directory) {
           super(directory);
   
           int retriesConfig = getUrl().getParameter(RETRIES_KEY, DEFAULT_FAILBACK_TIMES);
           if (retriesConfig <= 0) {
               retriesConfig = DEFAULT_FAILBACK_TIMES;
           }
           int failbackTasksConfig = getUrl().getParameter(FAIL_BACK_TASKS_KEY, DEFAULT_FAILBACK_TASKS);
           if (failbackTasksConfig <= 0) {
               failbackTasksConfig = DEFAULT_FAILBACK_TASKS;
           }
           retries = retriesConfig;
           failbackTasks = failbackTasksConfig;
       }


-- 
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


[GitHub] [dubbo] 283883031 commented on issue #8715: failback容错模式下,设置重试次数为0,依旧会重试一次

Posted by GitBox <gi...@apache.org>.
283883031 commented on issue #8715:
URL: https://github.com/apache/dubbo/issues/8715#issuecomment-1020882047


   > 
   
   ok


-- 
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


[GitHub] [dubbo] juzi214032 commented on issue #8715: failback容错模式下,设置重试次数为0,依旧会重试一次

Posted by GitBox <gi...@apache.org>.
juzi214032 commented on issue #8715:
URL: https://github.com/apache/dubbo/issues/8715#issuecomment-1020880521


   > ```
   >  public FailbackClusterInvoker(Directory<T> directory) {
   >         super(directory);
   > 
   >         int retriesConfig = getUrl().getParameter(RETRIES_KEY, DEFAULT_FAILBACK_TIMES);
   >         if (retriesConfig <= 0) {
   >             retriesConfig = DEFAULT_FAILBACK_TIMES;
   >         }
   >         int failbackTasksConfig = getUrl().getParameter(FAIL_BACK_TASKS_KEY, DEFAULT_FAILBACK_TASKS);
   >         if (failbackTasksConfig <= 0) {
   >             failbackTasksConfig = DEFAULT_FAILBACK_TASKS;
   >         }
   >         retries = retriesConfig;
   >         failbackTasks = failbackTasksConfig;
   >     }
   > ```
   > 
   > set retries is zero ,finaly it's default? 改了,最后还是没改?
   
   see https://github.com/apache/dubbo/pull/9526


-- 
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


[GitHub] [dubbo] changfubai commented on issue #8715: failback负载模式下,设置重试次数为0,依旧会重试一次

Posted by GitBox <gi...@apache.org>.
changfubai commented on issue #8715:
URL: https://github.com/apache/dubbo/issues/8715#issuecomment-914269478


   I'll fix it later.


-- 
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


[GitHub] [dubbo] AlbumenJ closed issue #8715: failback负载模式下,设置重试次数为0,依旧会重试一次

Posted by GitBox <gi...@apache.org>.
AlbumenJ closed issue #8715:
URL: https://github.com/apache/dubbo/issues/8715


   


-- 
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


[GitHub] [dubbo] changfubai commented on issue #8715: failback负载模式下,设置重试次数为0,依旧会重试一次

Posted by GitBox <gi...@apache.org>.
changfubai commented on issue #8715:
URL: https://github.com/apache/dubbo/issues/8715#issuecomment-1019746354


   > ```
   >  public FailbackClusterInvoker(Directory<T> directory) {
   >         super(directory);
   > 
   >         int retriesConfig = getUrl().getParameter(RETRIES_KEY, DEFAULT_FAILBACK_TIMES);
   >         if (retriesConfig <= 0) {
   >             retriesConfig = DEFAULT_FAILBACK_TIMES;
   >         }
   >         int failbackTasksConfig = getUrl().getParameter(FAIL_BACK_TASKS_KEY, DEFAULT_FAILBACK_TASKS);
   >         if (failbackTasksConfig <= 0) {
   >             failbackTasksConfig = DEFAULT_FAILBACK_TASKS;
   >         }
   >         retries = retriesConfig;
   >         failbackTasks = failbackTasksConfig;
   >     }
   > ```
   > 
   > set retries is zero ,finaly it's default? 改了,最后还是没改?
   
   这是构造方法的逻辑呀,我改的是run方法里的逻辑,显然不会又设置为DEFAULT_FAILBACK_TIMES呀


-- 
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


[GitHub] [dubbo] juzi214032 commented on issue #8715: failback容错模式下,设置重试次数为0,依旧会重试一次

Posted by GitBox <gi...@apache.org>.
juzi214032 commented on issue #8715:
URL: https://github.com/apache/dubbo/issues/8715#issuecomment-1020880521


   > ```
   >  public FailbackClusterInvoker(Directory<T> directory) {
   >         super(directory);
   > 
   >         int retriesConfig = getUrl().getParameter(RETRIES_KEY, DEFAULT_FAILBACK_TIMES);
   >         if (retriesConfig <= 0) {
   >             retriesConfig = DEFAULT_FAILBACK_TIMES;
   >         }
   >         int failbackTasksConfig = getUrl().getParameter(FAIL_BACK_TASKS_KEY, DEFAULT_FAILBACK_TASKS);
   >         if (failbackTasksConfig <= 0) {
   >             failbackTasksConfig = DEFAULT_FAILBACK_TASKS;
   >         }
   >         retries = retriesConfig;
   >         failbackTasks = failbackTasksConfig;
   >     }
   > ```
   > 
   > set retries is zero ,finaly it's default? 改了,最后还是没改?
   
   see https://github.com/apache/dubbo/pull/9526


-- 
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


[GitHub] [dubbo] 283883031 edited a comment on issue #8715: failback负载模式下,设置重试次数为0,依旧会重试一次

Posted by GitBox <gi...@apache.org>.
283883031 edited a comment on issue #8715:
URL: https://github.com/apache/dubbo/issues/8715#issuecomment-1004616208


   ```
    public FailbackClusterInvoker(Directory<T> directory) {
           super(directory);
   
           int retriesConfig = getUrl().getParameter(RETRIES_KEY, DEFAULT_FAILBACK_TIMES);
           if (retriesConfig <= 0) {
               retriesConfig = DEFAULT_FAILBACK_TIMES;
           }
           int failbackTasksConfig = getUrl().getParameter(FAIL_BACK_TASKS_KEY, DEFAULT_FAILBACK_TASKS);
           if (failbackTasksConfig <= 0) {
               failbackTasksConfig = DEFAULT_FAILBACK_TASKS;
           }
           retries = retriesConfig;
           failbackTasks = failbackTasksConfig;
       }
   ```
   
   set retries is zero ,finaly it's default?  改了,最后还是没改?


-- 
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