Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicate decrease for executes/actives when services throws exception. #PR: 4276 #4277

Closed
2 tasks done
haiyang1985 opened this issue Jun 11, 2019 · 0 comments
Closed
2 tasks done
Milestone

Comments

@haiyang1985
Copy link
Member

haiyang1985 commented Jun 11, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.7.2
  • Operating System version: Mac Os
  • Java version: JDK 1.8

Steps to reproduce this issue

Fix for PR: #4276

Step 1: set executes to 1 in dubbo:service

<bean id="demoService" class="com.xxx."/>
<dubbo:service interface="com.xxx" ref="demoService" executes="1">
</dubbo:service>

Step 2:
Invoke service with two threads concurrent. The second one have been rate limited.

ExecutorService executorService = Executors.newFixedThreadPool(2);
for (int i = 0; i < 2; i++) {
  executorService.submit(new Runnable() {
    @Override
    public void run() {
      String result = service.sayHello(input);
      System.out.println(result);
    }
  });
}

Step 3:
Repeat step 2, all two requests have been passed.

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

Step 3 should be rate limited.

Actual Result

Step 3 have not been rate limited.

If there is an exception, please attach the exception trace:

Just put your stack trace here!
@haiyang1985 haiyang1985 changed the title duplicate decrease for executes/actives when services throws exception. duplicate decrease for executes/actives when services throws exception. #PR: 4276 Jun 11, 2019
@chickenlj chickenlj added this to the 2.7.3 milestone Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants