dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beiwei30 (GitHub) <git...@apache.org>
Subject [GitHub] [incubator-dubbo] beiwei30 commented on pull request #3035: [DUBBO-3023]: problem in ActiveLimitFilter
Date Fri, 21 Dec 2018 05:46:06 GMT
In my current implementation:

```java
if (max > 0 && methodStatus.active.incrementAndGet() > max) {
   return false;
} else {
  return true;
}
```

it satisfies what I explained above. When limit exceeds, it will return false, and since it
is atomic operation, it can make sure further incoming requests to wait. If limit doesn't
exceeds or is not set, then it will return true and allow the requests to continue, instead
of wait.

More important, if we decide to allow the request to proceed, we need to make sure 'startCount'
and 'endCount' to be called in pair.

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3035 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


Mime
View raw message