You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2022/08/01 04:23:14 UTC
[GitHub] [servicecomb-java-chassis] hujinming178 opened a new pull request, #3251: [SCB-2656]The traffic limiting module of Java-chassis has problems in…
hujinming178 opened a new pull request, #3251:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3251
… the dynamic configuration scenario
Follow this checklist to help us incorporate your contribution quickly and easily:
- [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line and body.
- [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Run `mvn clean install -Pit` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
- [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
---
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 commented on pull request #3251: [SCB-2656]The traffic limiting module of Java-chassis has problems in…
Posted by GitBox <gi...@apache.org>.
liubao68 commented on PR #3251:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3251#issuecomment-1251811288
see https://github.com/apache/servicecomb-java-chassis/pull/3349/files
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 commented on a diff in pull request #3251: [SCB-2656]The traffic limiting module of Java-chassis has problems in…
Posted by GitBox <gi...@apache.org>.
liubao68 commented on code in PR #3251:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3251#discussion_r934161296
##########
handlers/handler-flowcontrol-qps/src/main/java/org/apache/servicecomb/qps/QpsControllerManager.java:
##########
@@ -211,15 +218,25 @@ protected void updateObjMap(String configKey) {
Iterator<Entry<String, AbstractQpsStrategy>> it = qualifiedNameControllerMap.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, AbstractQpsStrategy> entry = it.next();
+ AbstractQpsStrategy qpsStrategy = null;
if (keyMatch(configKey, entry)) {
- AbstractQpsStrategy qpsStrategy = searchQpsController(entry.getKey());
+ qpsStrategy = searchQpsController(entry.getKey());
if (qpsStrategy != null) {
entry.setValue(qpsStrategy);
LOGGER.info("QpsController updated, operationId = [{}], configKey = [{}], qpsLimit = [{}]",
entry.getKey(), qpsStrategy.getKey(), qpsStrategy.getQpsLimit());
} else {
it.remove();
}
+ } else if (isConfigKeyContainsANY(configKey)) {
+ qpsStrategy = searchQpsController(configKey);
+ if (qpsStrategy != null) {
+ entry.setValue(qpsStrategy);
+ LOGGER.info("QpsController updated, operationId = [{}], configKey = [{}], qpsLimit = [{}]",
+ entry.getKey(), qpsStrategy.getKey(), qpsStrategy.getQpsLimit());
Review Comment:
entry.getKey should be configKey
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 commented on a diff in pull request #3251: [SCB-2656]The traffic limiting module of Java-chassis has problems in…
Posted by GitBox <gi...@apache.org>.
liubao68 commented on code in PR #3251:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3251#discussion_r934162870
##########
handlers/handler-flowcontrol-qps/src/main/java/org/apache/servicecomb/qps/QpsControllerManager.java:
##########
@@ -167,6 +167,13 @@ private boolean keyMatch(String configKey, Entry<String, AbstractQpsStrategy> co
|| controllerEntry.getKey().startsWith(configKey + SEPARATOR);
}
+ /**
+ * Determine whether the micro-service level is ANY during dynamic configuration
+ */
+ private boolean isConfigKeyContainsANY(String configKey){
+ return configKey.contains("ANY");
Review Comment:
see Config.ANY_SERVICE
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 closed pull request #3251: [SCB-2656]The traffic limiting module of Java-chassis has problems in…
Posted by GitBox <gi...@apache.org>.
liubao68 closed pull request #3251: [SCB-2656]The traffic limiting module of Java-chassis has problems in…
URL: https://github.com/apache/servicecomb-java-chassis/pull/3251
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org