[GitHub] [servicecomb-service-center] robotLJW opened a new pull request #921: [SCB-2176] Fix:remove all instance properties and service properties …

2021-03-26 Thread GitBox


robotLJW opened a new pull request #921:
URL: https://github.com/apache/servicecomb-service-center/pull/921


   …& schemas
   
   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 `go build` `go test` `go fmt` `go vet` 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).
- [ ] Never comment source code, delete it.
- [ ] UT should has "context, subject, expected result" result as test case 
name, when you call t.Run().
   ---
   


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

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




[GitHub] [servicecomb-java-chassis] wujimin commented on a change in pull request #2314: [SCB-2237] allow InjectProperties inject to spring bean instance

2021-03-26 Thread GitBox


wujimin commented on a change in pull request #2314:
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/2314#discussion_r602654586



##
File path: 
service-registry/registry-lightweight/src/main/resources/microservice.yaml
##
@@ -0,0 +1,31 @@
+## ---
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##  http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---
+
+servicecomb-config-order: -1000

Review comment:
   discovery client alway invoke with endpoint, no need other logic, eg: 
auth client




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

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




[GitHub] [servicecomb-java-chassis] wujimin commented on a change in pull request #2314: [SCB-2237] allow InjectProperties inject to spring bean instance

2021-03-26 Thread GitBox


wujimin commented on a change in pull request #2314:
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/2314#discussion_r602652692



##
File path: 
inspector/src/main/java/org/apache/servicecomb/inspector/internal/InspectorConfig.java
##
@@ -31,15 +33,17 @@ public boolean isEnabled() {
 return enabled;
   }
 
-  public void setEnabled(boolean enabled) {
+  public InspectorConfig setEnabled(boolean enabled) {

Review comment:
   it's a shortcut for 
https://docs.servicecomb.io/java-chassis/zh_CN/config/read-config/  
   declare a class with @InjectProperties to be a bean, that's enough.




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

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




[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2314: [SCB-2237] allow InjectProperties inject to spring bean instance

2021-03-26 Thread GitBox


liubao68 commented on a change in pull request #2314:
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/2314#discussion_r602650337



##
File path: 
inspector/src/main/java/org/apache/servicecomb/inspector/internal/InspectorConfig.java
##
@@ -31,15 +33,17 @@ public boolean isEnabled() {
 return enabled;
   }
 
-  public void setEnabled(boolean enabled) {
+  public InspectorConfig setEnabled(boolean enabled) {

Review comment:
   Can you add this usage for this feature to demo / integration tests? so 
that we can add documents using the demo. 




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

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




[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2314: [SCB-2237] allow InjectProperties inject to spring bean instance

2021-03-26 Thread GitBox


liubao68 commented on a change in pull request #2314:
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/2314#discussion_r602649429



##
File path: 
service-registry/registry-lightweight/src/main/resources/microservice.yaml
##
@@ -0,0 +1,31 @@
+## ---
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##  http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---
+
+servicecomb-config-order: -1000

Review comment:
   why add this yaml?




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

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




[GitHub] [servicecomb-java-chassis] hy544358098 opened a new issue #2322: 调用第三方服务不支持"application/x-www-form-urlencoded"格式的接口

2021-03-26 Thread GitBox


hy544358098 opened a new issue #2322:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2322


   
调用第三方服务不支持"application/x-www-form-urlencoded"格式的接口,麻烦后续支持一下https://docs.servicecomb.io/java-chassis/zh_CN/build-consumer/3rd-party-service-invoke/


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

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




[GitHub] [servicecomb-docs] kaister3 opened a new pull request #234: [SCB-2233]add docs for yaml config source feature

2021-03-26 Thread GitBox


kaister3 opened a new pull request #234:
URL: https://github.com/apache/servicecomb-docs/pull/234


   


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

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




[GitHub] [servicecomb-docs] kaister3 opened a new pull request #233: [SCB-2232]add docs about executor

2021-03-26 Thread GitBox


kaister3 opened a new pull request #233:
URL: https://github.com/apache/servicecomb-docs/pull/233


   


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

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




[GitHub] [servicecomb-service-center] tianxiaoliang opened a new pull request #920: increase token signing performance

2021-03-26 Thread GitBox


tianxiaoliang opened a new pull request #920:
URL: https://github.com/apache/servicecomb-service-center/pull/920


   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 `go build` `go test` `go fmt` `go vet` 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).
- [ ] Never comment source code, delete it.
- [ ] UT should has "context, subject, expected result" result as test case 
name, when you call t.Run().
   ---
   


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

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




[GitHub] [servicecomb-java-chassis] liubao68 merged pull request #2317: [SCB-2224] BeanUtils.getBeanOfType return null when aksk enabled

2021-03-26 Thread GitBox


liubao68 merged pull request #2317:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2317


   


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

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




[servicecomb-java-chassis] branch master updated: [SCB-2224] BeanUtils.getBeanOfType return null when aksk enabled (#2317)

2021-03-26 Thread liubao
This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git


The following commit(s) were added to refs/heads/master by this push:
 new 30d01bf  [SCB-2224] BeanUtils.getBeanOfType return null when aksk 
enabled (#2317)
30d01bf is described below

commit 30d01bf2f315823221308f837632bef208ec331b
Author: wxkwxkwxk1231 
AuthorDate: Fri Mar 26 15:01:40 2021 +0800

[SCB-2224] BeanUtils.getBeanOfType return null when aksk enabled (#2317)

* [fix]cipher beans read before injected

* remove log

* [add]SPI file for Cipher
---
 .../servicestage/AKSKAuthHeaderProvider.java   |  6 --
 .../org.apache.servicecomb.foundation.auth.Cipher  | 18 ++
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git 
a/huawei-cloud/servicestage/src/main/java/org/apache/servicecomb/huaweicloud/servicestage/AKSKAuthHeaderProvider.java
 
b/huawei-cloud/servicestage/src/main/java/org/apache/servicecomb/huaweicloud/servicestage/AKSKAuthHeaderProvider.java
index 9e0da32..9467ae6 100644
--- 
a/huawei-cloud/servicestage/src/main/java/org/apache/servicecomb/huaweicloud/servicestage/AKSKAuthHeaderProvider.java
+++ 
b/huawei-cloud/servicestage/src/main/java/org/apache/servicecomb/huaweicloud/servicestage/AKSKAuthHeaderProvider.java
@@ -21,6 +21,7 @@ import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import java.nio.charset.StandardCharsets;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import javax.crypto.Mac;
@@ -35,6 +36,7 @@ import org.apache.servicecomb.foundation.auth.Cipher;
 import org.apache.servicecomb.foundation.auth.DefaultCipher;
 import org.apache.servicecomb.foundation.auth.ShaAKSKCipher;
 import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -142,8 +144,8 @@ public class AKSKAuthHeaderProvider implements 
AuthHeaderProvider {
   return DefaultCipher.getInstance();
 }
 
-Map cipherBeans = BeanUtils.getBeansOfType(Cipher.class);
-return cipherBeans.values().stream().filter(c -> 
c.name().equals(getCipher())).findFirst()
+List ciphers = 
SPIServiceUtils.getOrLoadSortedService(Cipher.class);
+return ciphers.stream().filter(c -> 
c.name().equals(getCipher())).findFirst()
 .orElseThrow(() -> new IllegalArgumentException("failed to find cipher 
named " + getCipher()));
   }
 
diff --git 
a/huawei-cloud/servicestage/src/main/resources/META-INF/services/org.apache.servicecomb.foundation.auth.Cipher
 
b/huawei-cloud/servicestage/src/main/resources/META-INF/services/org.apache.servicecomb.foundation.auth.Cipher
new file mode 100644
index 000..e242e7a
--- /dev/null
+++ 
b/huawei-cloud/servicestage/src/main/resources/META-INF/services/org.apache.servicecomb.foundation.auth.Cipher
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+org.apache.servicecomb.foundation.auth.ShaAKSKCipher
\ No newline at end of file


[GitHub] [servicecomb-java-chassis] liubao68 merged pull request #2321: [SCB-2243] zero-config remove @Conditional to not trigger configuration bug

2021-03-26 Thread GitBox


liubao68 merged pull request #2321:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2321


   


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

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




[servicecomb-java-chassis] branch master updated: [SCB-2243] zero-config remove @Conditional to not trigger configuration bug (#2321)

2021-03-26 Thread liubao
This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git


The following commit(s) were added to refs/heads/master by this push:
 new 05ee92a  [SCB-2243] zero-config remove @Conditional to not trigger 
configuration bug (#2321)
05ee92a is described below

commit 05ee92ac5a2943c84998d71a1045fee4e8875d00
Author: wujimin 
AuthorDate: Fri Mar 26 15:00:50 2021 +0800

[SCB-2243] zero-config remove @Conditional to not trigger configuration bug 
(#2321)
---
 ...itionOnMulticast.java => AbstractModeCondition.java} | 13 +
 .../java/org/apache/servicecomb/zeroconfig/Config.java  | 17 +
 .../apache/servicecomb/zeroconfig/ZeroConfigConst.java  |  2 +-
 .../servicecomb/zeroconfig/local/ConditionOnLocal.java  | 12 +---
 .../servicecomb/zeroconfig/local/LocalRegistration.java |  9 +++--
 .../zeroconfig/multicast/ConditionOnMulticast.java  | 12 +---
 .../servicecomb/zeroconfig/multicast/Multicast.java |  9 +++--
 .../zeroconfig/multicast/MulticastRegistration.java |  9 +++--
 .../zeroconfig/multicast/MulticastServer.java   |  8 ++--
 9 files changed, 64 insertions(+), 27 deletions(-)

diff --git 
a/service-registry/registry-zero-config/src/main/java/org/apache/servicecomb/zeroconfig/multicast/ConditionOnMulticast.java
 
b/service-registry/registry-zero-config/src/main/java/org/apache/servicecomb/zeroconfig/AbstractModeCondition.java
similarity index 73%
copy from 
service-registry/registry-zero-config/src/main/java/org/apache/servicecomb/zeroconfig/multicast/ConditionOnMulticast.java
copy to 
service-registry/registry-zero-config/src/main/java/org/apache/servicecomb/zeroconfig/AbstractModeCondition.java
index 656498c..4f3bbbe 100644
--- 
a/service-registry/registry-zero-config/src/main/java/org/apache/servicecomb/zeroconfig/multicast/ConditionOnMulticast.java
+++ 
b/service-registry/registry-zero-config/src/main/java/org/apache/servicecomb/zeroconfig/AbstractModeCondition.java
@@ -15,19 +15,24 @@
  * limitations under the License.
  */
 
-package org.apache.servicecomb.zeroconfig.multicast;
+package org.apache.servicecomb.zeroconfig;
 
+import static org.apache.servicecomb.zeroconfig.ZeroConfigConst.CFG_ENABLED;
 import static org.apache.servicecomb.zeroconfig.ZeroConfigConst.CFG_MODE;
-import static org.apache.servicecomb.zeroconfig.ZeroConfigConst.MODE_MULTICAST;
 
 import org.springframework.context.annotation.Condition;
 import org.springframework.context.annotation.ConditionContext;
 import org.springframework.core.type.AnnotatedTypeMetadata;
 
-public class ConditionOnMulticast implements Condition {
+// currently can not work with spring caused by servicecomb configuration bug
+// no problem to work with springboot
+public abstract class AbstractModeCondition implements Condition {
   @Override
   public boolean matches(ConditionContext context, AnnotatedTypeMetadata 
metadata) {
+boolean enabled = context.getEnvironment().getProperty(CFG_ENABLED, 
boolean.class, true);
 String mode = context.getEnvironment().getProperty(CFG_MODE);
-return mode == null || MODE_MULTICAST.equals(mode);
+return enabled && modeMatches(mode);
   }
+
+  protected abstract boolean modeMatches(String mode);
 }
diff --git 
a/service-registry/registry-zero-config/src/main/java/org/apache/servicecomb/zeroconfig/Config.java
 
b/service-registry/registry-zero-config/src/main/java/org/apache/servicecomb/zeroconfig/Config.java
index 2356c41..d1b11e7 100644
--- 
a/service-registry/registry-zero-config/src/main/java/org/apache/servicecomb/zeroconfig/Config.java
+++ 
b/service-registry/registry-zero-config/src/main/java/org/apache/servicecomb/zeroconfig/Config.java
@@ -22,12 +22,15 @@ import static 
org.apache.servicecomb.zeroconfig.ZeroConfigConst.CFG_ENABLED;
 import static org.apache.servicecomb.zeroconfig.ZeroConfigConst.CFG_GROUP;
 import static 
org.apache.servicecomb.zeroconfig.ZeroConfigConst.CFG_HEARTBEAT_INTERVAL;
 import static 
org.apache.servicecomb.zeroconfig.ZeroConfigConst.CFG_HEARTBEAT_LOST_TIMES;
+import static org.apache.servicecomb.zeroconfig.ZeroConfigConst.CFG_MODE;
 import static 
org.apache.servicecomb.zeroconfig.ZeroConfigConst.CFG_PULL_INTERVAL;
 import static 
org.apache.servicecomb.zeroconfig.ZeroConfigConst.DEFAULT_ADDRESS;
 import static org.apache.servicecomb.zeroconfig.ZeroConfigConst.DEFAULT_GROUP;
 import static 
org.apache.servicecomb.zeroconfig.ZeroConfigConst.DEFAULT_HEARTBEAT_INTERVAL;
 import static 
org.apache.servicecomb.zeroconfig.ZeroConfigConst.DEFAULT_HEARTBEAT_LOST_TIMES;
 import static 
org.apache.servicecomb.zeroconfig.ZeroConfigConst.DEFAULT_PULL_INTERVAL;
+import static org.apache.servicecomb.zeroconfig.ZeroConfigConst.MODE_LOCAL;
+import static org.apache.servicecomb.zeroconfig.ZeroConfigConst.MODE_MULTICAST;
 
 import java.time.Duration;
 
@@ -45,10 +48,24 @@ public 

[GitHub] [servicecomb-java-chassis] wujimin merged pull request #2305: [SCB-2216]breakpoints testing for fast timeout of execution

2021-03-26 Thread GitBox


wujimin merged pull request #2305:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2305


   


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

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




[servicecomb-java-chassis] 02/02: [SCB-2216]fix review comments

2021-03-26 Thread wujimin
This is an automated email from the ASF dual-hosted git repository.

wujimin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git

commit 0b46b0fabc1c9f5aa1905ce0697d02e389e31b92
Author: liubao68 
AuthorDate: Fri Mar 26 09:33:38 2021 +0800

[SCB-2216]fix review comments
---
 .../org/apache/servicecomb/transport/highway/HighwayClientFilter.java   | 2 +-
 .../org/apache/servicecomb/transport/rest/client/RestClientSender.java  | 2 +-
 .../servicecomb/transport/rest/client/RestClientSenderFilter.java   | 2 --
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git 
a/transports/transport-highway/src/main/java/org/apache/servicecomb/transport/highway/HighwayClientFilter.java
 
b/transports/transport-highway/src/main/java/org/apache/servicecomb/transport/highway/HighwayClientFilter.java
index fdd7a3e..ccebe79 100644
--- 
a/transports/transport-highway/src/main/java/org/apache/servicecomb/transport/highway/HighwayClientFilter.java
+++ 
b/transports/transport-highway/src/main/java/org/apache/servicecomb/transport/highway/HighwayClientFilter.java
@@ -62,7 +62,7 @@ public class HighwayClientFilter implements ConsumerFilter {
   }
 
   protected CompletableFuture send(Invocation invocation, 
OperationProtobuf operationProtobuf) {
-invocation.getInvocationStageTrace().startSend();
+invocation.onStartSendRequest();
 
 HighwayClient highwayClient = ((HighwayTransport) 
invocation.getTransport()).getHighwayClient();
 HighwayClientPackage clientPackage = 
highwayClient.createClientPackage(invocation, operationProtobuf);
diff --git 
a/transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/RestClientSender.java
 
b/transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/RestClientSender.java
index caa62b4..558245e 100644
--- 
a/transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/RestClientSender.java
+++ 
b/transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/RestClientSender.java
@@ -65,7 +65,7 @@ public class RestClientSender {
 
   @SuppressWarnings("deprecation")
   public CompletableFuture send() {
-invocation.getInvocationStageTrace().startSend();
+invocation.onStartSendRequest();
 
 httpClientRequest.exceptionHandler(future::completeExceptionally);
 httpClientRequest.handler(this::processResponse);
diff --git 
a/transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/RestClientSenderFilter.java
 
b/transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/RestClientSenderFilter.java
index 84e8baa..d5c2bd4 100644
--- 
a/transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/RestClientSenderFilter.java
+++ 
b/transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/RestClientSenderFilter.java
@@ -38,8 +38,6 @@ public class RestClientSenderFilter implements ConsumerFilter 
{
 
   @Override
   public CompletableFuture onFilter(Invocation invocation, 
FilterNode nextNode) {
-invocation.onStartSendRequest();
-
 CompletableFuture future = new RestClientSender(invocation)
 .send();
 


[servicecomb-java-chassis] branch master updated (00bc846 -> 0b46b0f)

2021-03-26 Thread wujimin
This is an automated email from the ASF dual-hosted git repository.

wujimin pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git.


from 00bc846  [SCB-2242] fix 
org.apache.servicecomb.core.definition.MicroserviceVersionsMeta#MicroserviceVersionsMeta
 bug of OOM (#2320)
 new c018bed  [SCB-2216]breakpoints testing for fast timeout of execution
 new 0b46b0f  [SCB-2216]fix review comments

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../common/rest/AbstractRestInvocation.java|  20 ++-
 .../java/org/apache/servicecomb/core/Const.java|   6 +
 .../org/apache/servicecomb/core/Invocation.java|  45 --
 .../core/definition/OperationConfig.java   |  21 +++
 ...ent.java => InvocationBusinessFinishEvent.java} |   5 +-
 ...vent.java => InvocationHandlersStartEvent.java} |   7 +-
 ...t.java => InvocationStartSendRequestEvent.java} |   7 +-
 ...Event.java => InvocationTimeoutCheckEvent.java} |   7 +-
 .../servicecomb/core/exception/ExceptionCodes.java |   1 +
 .../core/filter/impl/ScheduleFilter.java   |   2 +-
 .../invocation/InvocationTimeoutBootListener.java  | 159 +
 .../core/provider/consumer/InvokerUtils.java   |   7 +-
 .../core/definition/OperationConfigTest.java   |   9 ++
 .../src/main/resources/microservice.yaml   |   3 +
 .../src/main/resources/microservice.yaml   |   5 +-
 .../servicecomb/demo/CommonSchemaInterface.java|  23 +--
 .../java/org/apache/servicecomb/demo/TestMgr.java  |   4 +
 .../client/TestSpringMVCCommonSchemaInterface.java |  76 ++
 .../demo/springmvc/client/TestUploadSchema.java|   2 +
 .../src/main/resources/microservice.yaml   |   1 -
 .../springmvc/server/ProducerTestsAfterBootup.java |   4 +-
 .../server/SpringMVCCommonSchemaInterface.java |  60 
 .../demo/springmvc/server/UploadSchema.java|   4 +
 .../src/main/resources/microservice.yaml   |   6 +
 .../foundation/common/event/SimpleSubscriber.java  |   2 +-
 .../bizkeeper/FallbackPolicyManager.java   |   6 +-
 .../bizkeeper/TestFallbackPolicyManager.java   |   8 +-
 .../transport/highway/HighwayClient.java   |   2 +-
 .../transport/highway/HighwayClientFilter.java |   2 +-
 .../transport/highway/HighwayCodec.java|   1 -
 .../transport/highway/HighwayServerConnection.java |   2 +
 .../transport/highway/HighwayServerInvoke.java |   7 +-
 .../transport/highway/TestHighwayClient.java   |   4 -
 .../transport/highway/TestHighwayCodec.java|   6 +-
 .../transport/rest/client/RestClientSender.java|   2 +-
 .../rest/client/http/RestClientInvocation.java |   6 +-
 .../rest/client/http/TestRestClientInvocation.java |   3 -
 37 files changed, 455 insertions(+), 80 deletions(-)
 copy 
core/src/main/java/org/apache/servicecomb/core/event/{InvocationStartEvent.java 
=> InvocationBusinessFinishEvent.java} (86%)
 copy 
core/src/main/java/org/apache/servicecomb/core/event/{InvocationStartEvent.java 
=> InvocationHandlersStartEvent.java} (87%)
 copy 
core/src/main/java/org/apache/servicecomb/core/event/{InvocationStartEvent.java 
=> InvocationStartSendRequestEvent.java} (86%)
 copy 
core/src/main/java/org/apache/servicecomb/core/event/{InvocationStartEvent.java 
=> InvocationTimeoutCheckEvent.java} (87%)
 create mode 100644 
core/src/main/java/org/apache/servicecomb/core/invocation/InvocationTimeoutBootListener.java
 copy 
integration-tests/it-producer/src/main/java/org/apache/servicecomb/it/schema/TransportContextSchema.java
 => 
demo/demo-schema/src/main/java/org/apache/servicecomb/demo/CommonSchemaInterface.java
 (59%)
 create mode 100644 
demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/TestSpringMVCCommonSchemaInterface.java
 create mode 100644 
demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/SpringMVCCommonSchemaInterface.java


[servicecomb-java-chassis] 01/02: [SCB-2216]breakpoints testing for fast timeout of execution

2021-03-26 Thread wujimin
This is an automated email from the ASF dual-hosted git repository.

wujimin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git

commit c018bed9051cd8d7c27c07ec1824bc554d409eb0
Author: liubao68 
AuthorDate: Sat Mar 20 15:07:28 2021 +0800

[SCB-2216]breakpoints testing for fast timeout of execution
---
 .../common/rest/AbstractRestInvocation.java|  20 ++-
 .../java/org/apache/servicecomb/core/Const.java|   6 +
 .../org/apache/servicecomb/core/Invocation.java|  45 --
 .../core/definition/OperationConfig.java   |  21 +++
 .../InvocationBusinessFinishEvent.java}|  14 +-
 .../InvocationHandlersStartEvent.java} |  16 +--
 .../InvocationStartSendRequestEvent.java}  |  16 +--
 .../InvocationTimeoutCheckEvent.java}  |  16 +--
 .../servicecomb/core/exception/ExceptionCodes.java |   1 +
 .../core/filter/impl/ScheduleFilter.java   |   2 +-
 .../invocation/InvocationTimeoutBootListener.java  | 159 +
 .../core/provider/consumer/InvokerUtils.java   |   7 +-
 .../core/definition/OperationConfigTest.java   |   9 ++
 .../src/main/resources/microservice.yaml   |   3 +
 .../src/main/resources/microservice.yaml   |   5 +-
 .../servicecomb/demo/CommonSchemaInterface.java|  36 +
 .../java/org/apache/servicecomb/demo/TestMgr.java  |   4 +
 .../client/TestSpringMVCCommonSchemaInterface.java |  76 ++
 .../demo/springmvc/client/TestUploadSchema.java|   2 +
 .../src/main/resources/microservice.yaml   |   1 -
 .../springmvc/server/ProducerTestsAfterBootup.java |   4 +-
 .../server/SpringMVCCommonSchemaInterface.java |  60 
 .../demo/springmvc/server/UploadSchema.java|   4 +
 .../src/main/resources/microservice.yaml   |   6 +
 .../foundation/common/event/SimpleSubscriber.java  |   2 +-
 .../bizkeeper/FallbackPolicyManager.java   |   6 +-
 .../bizkeeper/TestFallbackPolicyManager.java   |   8 +-
 .../transport/highway/HighwayClient.java   |   2 +-
 .../transport/highway/HighwayCodec.java|   1 -
 .../transport/highway/HighwayServerConnection.java |   2 +
 .../transport/highway/HighwayServerInvoke.java |   7 +-
 .../transport/highway/TestHighwayClient.java   |   4 -
 .../transport/highway/TestHighwayCodec.java|   6 +-
 .../rest/client/RestClientSenderFilter.java|   2 +
 .../rest/client/http/RestClientInvocation.java |   6 +-
 .../rest/client/http/TestRestClientInvocation.java |   3 -
 36 files changed, 493 insertions(+), 89 deletions(-)

diff --git 
a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/AbstractRestInvocation.java
 
b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/AbstractRestInvocation.java
index 2304022..5041d6c 100644
--- 
a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/AbstractRestInvocation.java
+++ 
b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/AbstractRestInvocation.java
@@ -126,10 +126,6 @@ public abstract class AbstractRestInvocation {
   return;
 }
 
-invocation.onStart(requestEx, start);
-invocation.getInvocationStageTrace().startSchedule();
-OperationMeta operationMeta = restOperationMeta.getOperationMeta();
-
 try {
   this.setContext();
 } catch (Exception e) {
@@ -137,6 +133,10 @@ public abstract class AbstractRestInvocation {
   sendFailResponse(e);
   return;
 }
+
+invocation.onStart(requestEx, start);
+invocation.getInvocationStageTrace().startSchedule();
+OperationMeta operationMeta = restOperationMeta.getOperationMeta();
 
 Holder qpsFlowControlReject = checkQpsFlowControl(operationMeta);
 if (qpsFlowControlReject.value) {
@@ -160,8 +160,11 @@ public abstract class AbstractRestInvocation {
 }
 
 runOnExecutor();
+  } catch (InvocationException e) {
+LOGGER.error("Invocation failed, cause={}", e.getMessage());
+sendFailResponse(e);
   } catch (Throwable e) {
-LOGGER.error("rest server onRequest error", e);
+LOGGER.error("Processing rest server request error", e);
 sendFailResponse(e);
   }
 }
@@ -217,8 +220,11 @@ public abstract class AbstractRestInvocation {
   }
 
   doInvoke();
+} catch (InvocationException e) {
+  LOGGER.error("Invocation failed, cause={}", e.getMessage());
+  sendFailResponse(e);
 } catch (Throwable e) {
-  LOGGER.error("unknown rest exception.", e);
+  LOGGER.error("Processing rest server request error", e);
   sendFailResponse(e);
 }
   }
@@ -241,7 +247,7 @@ public abstract class AbstractRestInvocation {
   }
 
   protected void doInvoke() throws Throwable {
-invocation.getInvocationStageTrace().startHandlersRequest();
+invocation.onStartHandlersRequest();