[GitHub] [servicecomb-service-center] yeyiwei opened a new pull request #802: SC event sync

2020-12-29 Thread GitBox


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


   1.删除读取配置文件的代码,采用系统自带mongo配置。
   2.调用公共变量拼接key。
   3.删除notify状态检查及操作。
   



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] huangdong-new opened a new issue #2179: RPC调用处理链问题咨询

2020-12-29 Thread GitBox


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


   背景介绍:
   
我们的edge服务在转发REST请求时有自定义handler处理链鉴权,鉴权逻辑中某个特殊场景需要访问后端的微服务,因AsyncRestTemplate不建议使用,我们采用的是RPC方式。
   问题咨询:
  鉴权处理链中访问后端服务的请求如何避免走cosumer的处理链?只需要走loadbalance处理链就可以了。
   我当前的处理是对比转发和鉴权时invocation中endpoint差异,在代码中识别endpoint为空时直接跳过该处理链。麻烦提供下正版处理方法。
   



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] lilai23 commented on a change in pull request #801: sync data processer

2020-12-29 Thread GitBox


lilai23 commented on a change in pull request #801:
URL: 
https://github.com/apache/servicecomb-service-center/pull/801#discussion_r549953565



##
File path: datasource/mongo/event/instance_event_handler.go
##
@@ -0,0 +1,117 @@
+/*
+ * 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.
+ */
+
+package event
+
+import (
+   "context"
+   "fmt"
+   "github.com/apache/servicecomb-service-center/datasource/mongo"
+   "github.com/apache/servicecomb-service-center/datasource/mongo/sd"
+   "github.com/apache/servicecomb-service-center/pkg/dump"
+   "github.com/apache/servicecomb-service-center/pkg/log"
+   "github.com/apache/servicecomb-service-center/pkg/util"
+   "github.com/apache/servicecomb-service-center/server/syncernotify"
+   "github.com/go-chassis/cari/discovery"
+   "go.mongodb.org/mongo-driver/bson"
+)
+
+const (
+   SPLIT   = "/"
+   ServiceRootKey  = "/cse-sr/ms/files"
+   InstanceRootKey = "/cse-sr/inst/files"
+)

Review comment:
   建议引用datasource包下的常量

##
File path: datasource/mongo/event/instance_event_handler.go
##
@@ -0,0 +1,117 @@
+/*
+ * 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.
+ */
+
+package event
+
+import (
+   "context"
+   "fmt"
+   "github.com/apache/servicecomb-service-center/datasource/mongo"
+   "github.com/apache/servicecomb-service-center/datasource/mongo/sd"
+   "github.com/apache/servicecomb-service-center/pkg/dump"
+   "github.com/apache/servicecomb-service-center/pkg/log"
+   "github.com/apache/servicecomb-service-center/pkg/util"
+   "github.com/apache/servicecomb-service-center/server/syncernotify"
+   "github.com/go-chassis/cari/discovery"
+   "go.mongodb.org/mongo-driver/bson"
+)
+
+const (
+   SPLIT   = "/"
+   ServiceRootKey  = "/cse-sr/ms/files"
+   InstanceRootKey = "/cse-sr/inst/files"
+)
+
+// InstanceEventHandler is the handler to handle events
+//as instance registry or instance delete, and notify syncer
+type InstanceEventHandler struct {
+}
+
+func (h InstanceEventHandler) Type() string {
+   return mongo.CollectionInstance
+}
+
+func (h InstanceEventHandler) OnEvent(evt sd.MongoEvent) {
+   action := evt.Type
+   instance := evt.Value.(sd.Instance)
+   providerID := instance.InstanceInfo.ServiceId
+   providerInstanceID := instance.InstanceInfo.InstanceId
+
+   cacheService := sd.Store().Service().Cache().Get(providerID)
+   var ms *discovery.MicroService
+   if cacheService != nil {
+   ms = cacheService.(sd.Service).ServiceInfo
+   }
+   if ms == nil {
+   log.Info("get cached service failed, then get from data base")
+   service, errs := mongo.GetService(context.Background(), 
bson.M{"serviceinfo.serviceid": providerID})
+   if service == nil || errs != nil {
+   log.Error("get service from database failed", errs)
+   return
+   }
+   ms = service.ServiceInfo // service in the cache may not ready, 
query from db once
+   if ms == nil {
+   log.Warn(fmt.Sprintf("caught [%s] instance[%s/%s] 
event, endpoints %v, get provider's file failed from db\n",
+   action, providerID, providerInstanceID, 
instance.InstanceInfo.Endpoints))
+   return
+   }
+   }
+   if 

[GitHub] [servicecomb-service-center] tianxiaoliang merged pull request #800: implement of mongo DumpCache interface and optimization of syncer

2020-12-29 Thread GitBox


tianxiaoliang merged pull request #800:
URL: https://github.com/apache/servicecomb-service-center/pull/800


   



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-service-center] branch master updated: dumpcache接口实现以及syncer代码优化 (#800)

2020-12-29 Thread tianxiaoliang
This is an automated email from the ASF dual-hosted git repository.

tianxiaoliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git


The following commit(s) were added to refs/heads/master by this push:
 new 7abd499  dumpcache接口实现以及syncer代码优化 (#800)
7abd499 is described below

commit 7abd4990384fbda82dde78f10a12457a7b110cd3
Author: lilai23 <46025350+lila...@users.noreply.github.com>
AuthorDate: Wed Dec 30 14:10:49 2020 +0800

dumpcache接口实现以及syncer代码优化 (#800)

1.实现mongo的dumpcache接口
2.syncer逻辑优化
3.existence接口请求bug修复
4.重构dumpcache接口
---
 client/microservice.go|  2 +-
 datasource/{system.go => common.go}   | 15 ++-
 datasource/etcd/system.go |  4 +-
 datasource/etcd/system_test.go|  4 +-
 datasource/mongo/system.go| 34 +++-
 datasource/mongo/system_test.go   | 77 +++
 datasource/system.go  |  2 +-
 server/rest/admin/service.go  |  4 +-
 syncer/grpc/grpc.go   | 11 +++--
 syncer/server/handler.go  |  5 ++-
 syncer/servicecenter/servicecenter.go | 22 ++
 syncer/servicecenter/sync.go  | 21 ++
 12 files changed, 158 insertions(+), 43 deletions(-)

diff --git a/client/microservice.go b/client/microservice.go
index ae81678..a87bad0 100644
--- a/client/microservice.go
+++ b/client/microservice.go
@@ -94,7 +94,7 @@ func (c *Client) ServiceExistence(ctx context.Context, 
domain, project string, a
query := url.Values{}
query.Set("type", "microservice")
query.Set("env", env)
-   query.Set("appID", appID)
+   query.Set("appId", appID)
query.Set("serviceName", serviceName)
query.Set("version", versionRule)
 
diff --git a/datasource/system.go b/datasource/common.go
similarity index 70%
copy from datasource/system.go
copy to datasource/common.go
index 67771bf..b732eb8 100644
--- a/datasource/system.go
+++ b/datasource/common.go
@@ -17,15 +17,8 @@
 
 package datasource
 
-import (
-   "context"
-
-   "github.com/apache/servicecomb-service-center/pkg/dump"
+const (
+   ServiceKeyPrefix  = "/cse-sr/ms/files"
+   InstanceKeyPrefix = "/cse-sr/inst/files"
+   SPLIT = "/"
 )
-
-// SystemManager contains the APIs of system management
-type SystemManager interface {
-   DumpCache(ctx context.Context, cache *dump.Cache)
-   DLock(ctx context.Context, request *DLockRequest) error
-   DUnlock(ctx context.Context, request *DUnlockRequest) error
-}
diff --git a/datasource/etcd/system.go b/datasource/etcd/system.go
index 6c2b4b5..b7fdf64 100644
--- a/datasource/etcd/system.go
+++ b/datasource/etcd/system.go
@@ -29,7 +29,8 @@ import (
"github.com/apache/servicecomb-service-center/pkg/gopool"
 )
 
-func (ds *DataSource) DumpCache(ctx context.Context, cache *dump.Cache) {
+func (ds *DataSource) DumpCache(ctx context.Context) *dump.Cache {
+   var cache dump.Cache
gopool.New(ctx, gopool.Configure().Workers(2)).
Do(func(_ context.Context) { setValue(kv.Store().Service(), 
) }).
Do(func(_ context.Context) { 
setValue(kv.Store().ServiceIndex(), ) }).
@@ -41,6 +42,7 @@ func (ds *DataSource) DumpCache(ctx context.Context, cache 
*dump.Cache) {
Do(func(_ context.Context) { 
setValue(kv.Store().SchemaSummary(), ) }).
Do(func(_ context.Context) { setValue(kv.Store().Instance(), 
) }).
Done()
+   return 
 }
 
 func setValue(e sd.Adaptor, setter dump.Setter) {
diff --git a/datasource/etcd/system_test.go b/datasource/etcd/system_test.go
index ae624d7..09e11ba 100644
--- a/datasource/etcd/system_test.go
+++ b/datasource/etcd/system_test.go
@@ -20,13 +20,11 @@ import (
"testing"
 
"github.com/apache/servicecomb-service-center/datasource"
-   "github.com/apache/servicecomb-service-center/pkg/dump"
"github.com/stretchr/testify/assert"
 )
 
 func TestAdminService_Dump(t *testing.T) {
t.Log("execute 'dump' operation,when get all,should be passed")
-   var cache dump.Cache
-   datasource.Instance().DumpCache(getContext(), )
+   cache := datasource.Instance().DumpCache(getContext())
assert.Equal(t, len(cache.Indexes), len(cache.Microservices))
 }
diff --git a/datasource/mongo/system.go b/datasource/mongo/system.go
index f3d8ea8..3356920 100644
--- a/datasource/mongo/system.go
+++ b/datasource/mongo/system.go
@@ -21,11 +21,19 @@ import (
"context"
 
"github.com/apache/servicecomb-service-center/datasource"
+   "github.com/apache/servicecomb-service-center/datasource/mongo/sd"
"github.com/apache/servicecomb-service-center/pkg/dump"
+   "github.com/apache/servicecomb-service-center/pkg/gopool"
+   "github.com/apache/servicecomb-service-center/pkg/util"
 )
 
-func (ds *DataSource) DumpCache(ctx 

[GitHub] [servicecomb-java-chassis] Neverstop commented on issue #2178: servicecomb解析环境变量异常参数失败,导致无法启动

2020-12-29 Thread GitBox


Neverstop commented on issue #2178:
URL: 
https://github.com/apache/servicecomb-java-chassis/issues/2178#issuecomment-752311665


   好的 了解了 多谢



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] Neverstop closed issue #2178: servicecomb解析环境变量异常参数失败,导致无法启动

2020-12-29 Thread GitBox


Neverstop closed issue #2178:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2178


   



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] yhs0092 commented on issue #2178: servicecomb解析环境变量异常参数失败,导致无法启动

2020-12-29 Thread GitBox


yhs0092 commented on issue #2178:
URL: 
https://github.com/apache/servicecomb-java-chassis/issues/2178#issuecomment-752311514


   > 
   > 
   > 的确发现了奇怪的环境变量 我们会加载所有的环境变量对吗 有奇怪的就会报错是吗
   
   是的,Java-Chassis又不知道哪些是你想要的,所以只能全部加载了



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 commented on a change in pull request #800: implement of mongo DumpCache interface and optimization of syncer

2020-12-29 Thread GitBox


tianxiaoliang commented on a change in pull request #800:
URL: 
https://github.com/apache/servicecomb-service-center/pull/800#discussion_r549919856



##
File path: datasource/mongo/system.go
##
@@ -21,11 +21,25 @@ import (
"context"
 
"github.com/apache/servicecomb-service-center/datasource"
+   "github.com/apache/servicecomb-service-center/datasource/mongo/sd"
"github.com/apache/servicecomb-service-center/pkg/dump"
+   "github.com/apache/servicecomb-service-center/pkg/gopool"
+   "github.com/apache/servicecomb-service-center/pkg/util"
 )
 
-func (ds *DataSource) DumpCache(ctx context.Context, cache *dump.Cache) {
+const (
+   ServiceKeyPrefix  = "/cse-sr/ms/files"

Review comment:
   这里还没抽取





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] Neverstop commented on issue #2178: servicecomb解析环境变量异常参数失败,导致无法启动

2020-12-29 Thread GitBox


Neverstop commented on issue #2178:
URL: 
https://github.com/apache/servicecomb-java-chassis/issues/2178#issuecomment-752310962


   的确发现了奇怪的环境变量  我们会加载所有的环境变量对吗 有奇怪的就会报错是吗



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] Neverstop commented on issue #2178: servicecomb解析环境变量异常参数失败,导致无法启动

2020-12-29 Thread GitBox


Neverstop commented on issue #2178:
URL: 
https://github.com/apache/servicecomb-java-chassis/issues/2178#issuecomment-752310618


   是的 不行的arm的。 但是arm也有成功的
   我已经在排查环境变量了 



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] yhs0092 commented on issue #2178: servicecomb解析环境变量异常参数失败,导致无法启动

2020-12-29 Thread GitBox


yhs0092 commented on issue #2178:
URL: 
https://github.com/apache/servicecomb-java-chassis/issues/2178#issuecomment-752310345


   两台行的是x86的,两台不行的是arm的吗?直接原因刚刚已经给出来了,建议先排查一下环境变量吧 : )



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] Neverstop commented on issue #2178: servicecomb解析环境变量异常参数失败,导致无法启动

2020-12-29 Thread GitBox


Neverstop commented on issue #2178:
URL: 
https://github.com/apache/servicecomb-java-chassis/issues/2178#issuecomment-752310185


   我们机器部署了四台 两台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.

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




[GitHub] [servicecomb-java-chassis] yhs0092 commented on issue #2178: servicecomb解析环境变量异常参数失败,导致无法启动

2020-12-29 Thread GitBox


yhs0092 commented on issue #2178:
URL: 
https://github.com/apache/servicecomb-java-chassis/issues/2178#issuecomment-752310140


   
这种通常是部署环境的环境变量里有些很复杂的内容,Java-Chassis使用Spring做配置的加载和解析的时候碰到花括号,误将其作为配置占位符进行解析而报错导致的。



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] yhs0092 commented on issue #2178: servicecomb解析环境变量异常参数失败,导致无法启动

2020-12-29 Thread GitBox


yhs0092 commented on issue #2178:
URL: 
https://github.com/apache/servicecomb-java-chassis/issues/2178#issuecomment-752309876


   `Caused by: java.lang.RuntimeException: set up spring property source 
failed.If you still want to start up the application and ignore errors, you can 
set servicecomb.config.ignoreResolveFailure to true.`
   
解决方法已经在日志里面打出来了,microservice.yaml文件配置一下`servicecomb.config.ignoreResolveFailure=true`就能解决



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] Neverstop opened a new issue #2178: servicecomb解析环境变量异常参数失败,导致无法启动

2020-12-29 Thread GitBox


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


   使用版本 servicecomb 2.0.2
   
   Exception in thread "main" 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'org.apache.servicecomb.core.ConfigurationSpringInitializer#0' 
defined in URL 
[jar:file:/opt/huawei/release/speaker/SCSpeakerKgService/20201230013554/lib/java-chassis-core-2.0.2.jar!/META-INF/spring/cse.bean.xml]:
 Initialization of bean failed; nested exception is java.lang.RuntimeException: 
set up spring property source failed.If you still want to start up the 
application and ignore errors, you can set 
servicecomb.config.ignoreResolveFailure to true.
   at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602)
   at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
   at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207)
   at 
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:155)
   at 
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:707)
   at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:533)
   at 
org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:144)
   at 
org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:95)
   at 
org.apache.servicecomb.foundation.common.utils.BeanUtils.init(BeanUtils.java:62)
   at 
org.apache.servicecomb.foundation.common.utils.BeanUtils.init(BeanUtils.java:53)
   at 
com.huawei.poisson.knowledgegraph.SpeakerKnowledgeGraphMain.main(SpeakerKnowledgeGraphMain.java:62)
   Caused by: java.lang.RuntimeException: set up spring property source 
failed.If you still want to start up the application and ignore errors, you can 
set servicecomb.config.ignoreResolveFailure to true.
   at 
org.apache.servicecomb.core.ConfigurationSpringInitializer.getProperties(ConfigurationSpringInitializer.java:207)
   at 
org.apache.servicecomb.core.ConfigurationSpringInitializer.getAllProperties(ConfigurationSpringInitializer.java:182)
   at 
org.apache.servicecomb.core.ConfigurationSpringInitializer.setEnvironment(ConfigurationSpringInitializer.java:83)
   at 
org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:108)
   at 
org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:100)
   at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:415)
   at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1786)
   at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
   ... 13 more
   Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 
'IFS+x' in value "() {  unset _mlre _mlIFS _mlshdbg;
if [ "${MODULES_SILENT_SHELL_DEBUG:-0}" = '1' ]; then
case "$-" in
*v*x*)
set +vx;
_mlshdbg='vx'
;;
*v*)
set +v;
_mlshdbg='v'
;;
*x*)
set +x;
_mlshdbg='x'
;;
*)
_mlshdbg=''
;;
esac;
fi;
if [ -n "${IFS+x}" ]; then
_mlIFS=$IFS;
fi;
IFS=' ';
for _mlv in ${MODULES_RUN_QUARANTINE:-};
do
if [ "${_mlv}" = "${_mlv##*[!A-Za-z0-9_]}" -a "${_mlv}" = "${_mlv#[0-9]}" 
]; then
   
   



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] lilai23 commented on a change in pull request #800: implement of mongo DumpCache interface and optimization of syncer

2020-12-29 Thread GitBox


lilai23 commented on a change in pull request #800:
URL: 
https://github.com/apache/servicecomb-service-center/pull/800#discussion_r549916241



##
File path: syncer/servicecenter/sync.go
##
@@ -42,15 +43,22 @@ func (s *servicecenter) heartbeatInstances(mapping 
pb.SyncMapping, instance *pb.
 
 func (s *servicecenter) createService(service *pb.SyncService) string {

Review comment:
   已修改 抛出err给调用处理





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] yeyiwei commented on a change in pull request #801: sync data processer

2020-12-29 Thread GitBox


yeyiwei commented on a change in pull request #801:
URL: 
https://github.com/apache/servicecomb-service-center/pull/801#discussion_r549914738



##
File path: datasource/mongo/event/instance_event_handler.go
##
@@ -0,0 +1,152 @@
+/*
+ * 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.
+ */
+
+package event
+
+import (
+   "context"
+   "fmt"
+   "io/ioutil"
+   "path/filepath"
+
+   "github.com/apache/servicecomb-service-center/datasource/etcd/path"

Review comment:
   
改了以后是在mongo包里增加了一些key相关的常量,这些常量如果要和etcd共用是不是需要把etcd的path包提出来,或者把这些常量单独提出来?





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 commented on a change in pull request #800: implement of mongo DumpCache interface and optimization of syncer

2020-12-29 Thread GitBox


tianxiaoliang commented on a change in pull request #800:
URL: 
https://github.com/apache/servicecomb-service-center/pull/800#discussion_r549902955



##
File path: syncer/servicecenter/sync.go
##
@@ -42,15 +43,22 @@ func (s *servicecenter) heartbeatInstances(mapping 
pb.SyncMapping, instance *pb.
 
 func (s *servicecenter) createService(service *pb.SyncService) string {

Review comment:
   这个方法应该明确返回err,而不是内部消化了,不知道有何特别的场景





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 commented on a change in pull request #800: implement of mongo DumpCache interface and optimization of syncer

2020-12-29 Thread GitBox


tianxiaoliang commented on a change in pull request #800:
URL: 
https://github.com/apache/servicecomb-service-center/pull/800#discussion_r549900668



##
File path: datasource/mongo/system.go
##
@@ -21,11 +21,23 @@ import (
"context"
 
"github.com/apache/servicecomb-service-center/datasource"
+   "github.com/apache/servicecomb-service-center/datasource/mongo/sd"
"github.com/apache/servicecomb-service-center/pkg/dump"
+   "github.com/apache/servicecomb-service-center/pkg/gopool"
+   "github.com/apache/servicecomb-service-center/pkg/util"
 )
 
-func (ds *DataSource) DumpCache(ctx context.Context, cache *dump.Cache) {
+const (
+   ServiceKeyPrefix  = "/cse-sr/ms/files"

Review comment:
   这些常量为何不能和etcd共用

##
File path: syncer/servicecenter/sync.go
##
@@ -42,15 +43,22 @@ func (s *servicecenter) heartbeatInstances(mapping 
pb.SyncMapping, instance *pb.
 
 func (s *servicecenter) createService(service *pb.SyncService) string {
ctx := context.Background()
-   serviceID, _ := s.servicecenter.ServiceExistence(ctx, 
service.DomainProject, service)
+   serviceID, err := s.servicecenter.ServiceExistence(ctx, 
service.DomainProject, service)
+   if err != nil {
+   log.Error("Get service existence failed", err)
+   return ""
+   }
+
if serviceID == "" {
var err error
serviceID, err = s.servicecenter.CreateService(ctx, 
service.DomainProject, service)
if err != nil {
-   log.Errorf(err, "Servicecenter create service failed")
+   log.Error("Servicecenter create service failed", err)

Review comment:
   go的日志开头不能是大写,都是小写,而且主语是一个废话





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 merged pull request #2177: [SCB-2171]avoid leak server ip when process TimeoutException

2020-12-29 Thread GitBox


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


   



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-2171]avoid leak server ip when process TimeoutException

2020-12-29 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


The following commit(s) were added to refs/heads/master by this push:
 new b2396eb  [SCB-2171]avoid leak server ip when process TimeoutException
b2396eb is described below

commit b2396eb06a41ad1aef85cdd28727ca7b75a5daf8
Author: liubao 
AuthorDate: Tue Dec 29 15:57:43 2020 +0800

[SCB-2171]avoid leak server ip when process TimeoutException
---
 .../servicecomb/demo/jaxrs/client/TestClientTimeout.java   |  2 +-
 .../servicecomb/demo/springmvc/client/SpringmvcClient.java |  6 ++
 .../apache/servicecomb/transport/highway/HighwayClient.java| 10 +-
 .../transport/rest/client/http/RestClientInvocation.java   |  5 -
 4 files changed, 20 insertions(+), 3 deletions(-)

diff --git 
a/demo/demo-jaxrs/jaxrs-client/src/main/java/org/apache/servicecomb/demo/jaxrs/client/TestClientTimeout.java
 
b/demo/demo-jaxrs/jaxrs-client/src/main/java/org/apache/servicecomb/demo/jaxrs/client/TestClientTimeout.java
index 9c3ea15..73ae73d 100644
--- 
a/demo/demo-jaxrs/jaxrs-client/src/main/java/org/apache/servicecomb/demo/jaxrs/client/TestClientTimeout.java
+++ 
b/demo/demo-jaxrs/jaxrs-client/src/main/java/org/apache/servicecomb/demo/jaxrs/client/TestClientTimeout.java
@@ -75,7 +75,7 @@ public class TestClientTimeout implements CategorizedTestCase 
{
   // implement timeout with same error code and message for rest and 
highway
   TestMgr.check(408, e.getStatus().getStatusCode());
   TestMgr.check(true,
-  e.getErrorData().toString().contains("CommonExceptionData 
[message=Request Timeout. Details:"));
+  e.getErrorData().toString().contains("CommonExceptionData 
[message=Request Timeout."));
   TestMgr.check(serviceCombServerStats.getContinuousFailureCount(), 
failures + 1);
 }
 
diff --git 
a/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
 
b/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
index e8c31a1..b3a1a79 100644
--- 
a/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
+++ 
b/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java
@@ -230,6 +230,12 @@ public class SpringmvcClient {
 template.getForObject(prefix + "/controller/sayhi?name={name}",
 String.class,
 "world1"));
+
+TestMgr.check("hi world1+world2 [world1+world2]",
+template.getForObject(prefix + "/controller/sayhi?name={name}",
+String.class,
+"world1+world2"));
+
 TestMgr.check("hi hi 中国 [hi 中国]",
 template.getForObject(prefix + "/controller/sayhi?name={name}",
 String.class,
diff --git 
a/transports/transport-highway/src/main/java/org/apache/servicecomb/transport/highway/HighwayClient.java
 
b/transports/transport-highway/src/main/java/org/apache/servicecomb/transport/highway/HighwayClient.java
index 4327549..630a095 100644
--- 
a/transports/transport-highway/src/main/java/org/apache/servicecomb/transport/highway/HighwayClient.java
+++ 
b/transports/transport-highway/src/main/java/org/apache/servicecomb/transport/highway/HighwayClient.java
@@ -36,6 +36,8 @@ import 
org.apache.servicecomb.swagger.invocation.AsyncResponse;
 import org.apache.servicecomb.swagger.invocation.Response;
 import org.apache.servicecomb.swagger.invocation.exception.CommonExceptionData;
 import org.apache.servicecomb.swagger.invocation.exception.InvocationException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.netflix.config.DynamicPropertyFactory;
 
@@ -43,6 +45,8 @@ import io.vertx.core.DeploymentOptions;
 import io.vertx.core.Vertx;
 
 public class HighwayClient {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(HighwayClient.class);
+
   private static final String SSL_KEY = "highway.consumer";
 
   private ClientPoolManager clientMgr;
@@ -101,8 +105,12 @@ public class HighwayClient {
   invocation.getInvocationStageTrace().finishClientFiltersResponse();
   if (ar.cause() instanceof TimeoutException) {
 // give an accurate cause for timeout exception
+//   The timeout period of 3ms has been exceeded while 
executing GET /xxx for server 1.1.1.1:8080
+// should not copy the message to invocationException to avoid 
leak server ip address
+LOGGER.info("Request timeout, Details: {}.", 
ar.cause().getMessage());
+
 asyncResp.consumerFail(new 
InvocationException(Status.REQUEST_TIMEOUT,
-new CommonExceptionData(String.format("Request Timeout. 
Details: %s", ar.cause().getMessage();
+new CommonExceptionData("Request 

[GitHub] [servicecomb-service-center] yeyiwei commented on a change in pull request #801: sync data processer

2020-12-29 Thread GitBox


yeyiwei commented on a change in pull request #801:
URL: 
https://github.com/apache/servicecomb-service-center/pull/801#discussion_r549651902



##
File path: 
syncer/samples/multi-servicecenters/servicecenter/hello-server/servicecenter/config.go
##
@@ -56,6 +56,15 @@ type Instance struct {
 type Registry struct {
Address   string   `yaml:"address"`
Endpoints []string `yaml:"-"`
+   MongoDB   *MongoDB `yaml:"mongo"`
+}

Review comment:
   使用系统自带mongo配置,该结构体已还原





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] yeyiwei commented on a change in pull request #801: sync data processer

2020-12-29 Thread GitBox


yeyiwei commented on a change in pull request #801:
URL: 
https://github.com/apache/servicecomb-service-center/pull/801#discussion_r549651484



##
File path: datasource/mongo/event/instance_event_handler.go
##
@@ -0,0 +1,152 @@
+/*
+ * 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.
+ */
+
+package event
+
+import (
+   "context"
+   "fmt"
+   "io/ioutil"
+   "path/filepath"
+
+   "github.com/apache/servicecomb-service-center/datasource/etcd/path"
+   "github.com/apache/servicecomb-service-center/datasource/mongo"
+   "github.com/apache/servicecomb-service-center/datasource/mongo/sd"
+   "github.com/apache/servicecomb-service-center/pkg/dump"
+   "github.com/apache/servicecomb-service-center/pkg/log"
+   "github.com/apache/servicecomb-service-center/pkg/util"
+   "github.com/apache/servicecomb-service-center/server/notify"
+   "github.com/apache/servicecomb-service-center/server/syncernotify"
+   
"github.com/apache/servicecomb-service-center/syncer/samples/multi-servicecenters/servicecenter/hello-server/servicecenter"
+   "github.com/go-chassis/cari/discovery"
+   "github.com/go-chassis/go-chassis/v2/storage"
+   "go.mongodb.org/mongo-driver/bson"
+   "gopkg.in/yaml.v2"
+)
+
+// InstanceEventHandler is the handler to handle events
+//as instance registry or instance delete, and notify syncer
+type InstanceEventHandler struct {
+}
+
+func (h InstanceEventHandler) Type() string {
+   return mongo.CollectionInstance
+}
+
+func (h InstanceEventHandler) OnEvent(evt sd.MongoEvent) {
+   action := evt.Type
+   instance := evt.Value.(sd.Instance)
+   providerID := instance.InstanceInfo.ServiceId
+   providerInstanceID := instance.InstanceInfo.InstanceId
+
+   cacheService := sd.Store().Service().Cache().Get(providerID)
+   var ms *discovery.MicroService
+   if cacheService != nil {
+   ms = cacheService.(sd.Service).ServiceInfo
+   }
+   if ms == nil {
+   log.Info("get cached service failed, then get from data base")
+   ms = getServiceFromDB(providerID) // service in the cache may 
not ready, query from db one time
+   if ms == nil {
+   log.Warn(fmt.Sprintf("caught [%s] instance[%s/%s] 
event, endpoints %v, get provider's file failed from db\n",
+   action, providerID, providerInstanceID, 
instance.InstanceInfo.Endpoints))
+   return
+   }
+   }
+   if !syncernotify.GetSyncerNotifyCenter().Closed() {
+   NotifySyncerInstanceEvent(evt, ms)
+   }
+
+   if notify.Center().Closed() {

Review comment:
   已取消对notify状态检查





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] yeyiwei commented on a change in pull request #801: sync data processer

2020-12-29 Thread GitBox


yeyiwei commented on a change in pull request #801:
URL: 
https://github.com/apache/servicecomb-service-center/pull/801#discussion_r549651198



##
File path: datasource/mongo/event/instance_event_handler.go
##
@@ -0,0 +1,152 @@
+/*
+ * 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.
+ */
+
+package event
+
+import (
+   "context"
+   "fmt"
+   "io/ioutil"
+   "path/filepath"
+
+   "github.com/apache/servicecomb-service-center/datasource/etcd/path"
+   "github.com/apache/servicecomb-service-center/datasource/mongo"
+   "github.com/apache/servicecomb-service-center/datasource/mongo/sd"
+   "github.com/apache/servicecomb-service-center/pkg/dump"
+   "github.com/apache/servicecomb-service-center/pkg/log"
+   "github.com/apache/servicecomb-service-center/pkg/util"
+   "github.com/apache/servicecomb-service-center/server/notify"
+   "github.com/apache/servicecomb-service-center/server/syncernotify"
+   
"github.com/apache/servicecomb-service-center/syncer/samples/multi-servicecenters/servicecenter/hello-server/servicecenter"

Review comment:
   取消读取配置文件,代码中已经不需要该结构体,更改的文件已还原





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] yeyiwei commented on a change in pull request #801: sync data processer

2020-12-29 Thread GitBox


yeyiwei commented on a change in pull request #801:
URL: 
https://github.com/apache/servicecomb-service-center/pull/801#discussion_r549650836



##
File path: datasource/mongo/event/instance_event_handler.go
##
@@ -0,0 +1,152 @@
+/*
+ * 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.
+ */
+
+package event
+
+import (
+   "context"
+   "fmt"
+   "io/ioutil"
+   "path/filepath"
+
+   "github.com/apache/servicecomb-service-center/datasource/etcd/path"
+   "github.com/apache/servicecomb-service-center/datasource/mongo"
+   "github.com/apache/servicecomb-service-center/datasource/mongo/sd"
+   "github.com/apache/servicecomb-service-center/pkg/dump"
+   "github.com/apache/servicecomb-service-center/pkg/log"
+   "github.com/apache/servicecomb-service-center/pkg/util"
+   "github.com/apache/servicecomb-service-center/server/notify"
+   "github.com/apache/servicecomb-service-center/server/syncernotify"
+   
"github.com/apache/servicecomb-service-center/syncer/samples/multi-servicecenters/servicecenter/hello-server/servicecenter"
+   "github.com/go-chassis/cari/discovery"
+   "github.com/go-chassis/go-chassis/v2/storage"
+   "go.mongodb.org/mongo-driver/bson"
+   "gopkg.in/yaml.v2"
+)
+
+// InstanceEventHandler is the handler to handle events
+//as instance registry or instance delete, and notify syncer
+type InstanceEventHandler struct {
+}
+
+func (h InstanceEventHandler) Type() string {
+   return mongo.CollectionInstance
+}
+
+func (h InstanceEventHandler) OnEvent(evt sd.MongoEvent) {
+   action := evt.Type
+   instance := evt.Value.(sd.Instance)
+   providerID := instance.InstanceInfo.ServiceId
+   providerInstanceID := instance.InstanceInfo.InstanceId
+
+   cacheService := sd.Store().Service().Cache().Get(providerID)
+   var ms *discovery.MicroService
+   if cacheService != nil {
+   ms = cacheService.(sd.Service).ServiceInfo
+   }
+   if ms == nil {
+   log.Info("get cached service failed, then get from data base")
+   ms = getServiceFromDB(providerID) // service in the cache may 
not ready, query from db one time
+   if ms == nil {
+   log.Warn(fmt.Sprintf("caught [%s] instance[%s/%s] 
event, endpoints %v, get provider's file failed from db\n",
+   action, providerID, providerInstanceID, 
instance.InstanceInfo.Endpoints))
+   return
+   }
+   }
+   if !syncernotify.GetSyncerNotifyCenter().Closed() {
+   NotifySyncerInstanceEvent(evt, ms)
+   }
+
+   if notify.Center().Closed() {
+   log.Warn(fmt.Sprintf("caught [%s] instance[%s/%s] event, 
endpoints %v, but notify service is closed\n",
+   evt.Type, providerID, providerInstanceID, 
instance.InstanceInfo.Endpoints))
+   return
+   }
+}
+
+func NewInstanceEventHandler() *InstanceEventHandler {
+   return {}
+}
+
+func NotifySyncerInstanceEvent(evt sd.MongoEvent, ms *discovery.MicroService) {
+   instance := evt.Value.(sd.Instance).InstanceInfo
+   log.Info(fmt.Sprintf("instance in NotifySyncerInstanceEvent : %v", 
instance))
+   instanceKey := 
path.GenerateInstanceKey(evt.Value.(sd.Instance).Domain+"/"+
+   evt.Value.(sd.Instance).Project, instance.ServiceId, 
instance.InstanceId)
+
+   instanceKv := dump.KV{
+   Key:   instanceKey,
+   Value: instance,
+   }
+
+   dInstance := dump.Instance{
+   KV:,
+   Value: instance,
+   }
+   serviceKey := 
path.GenerateServiceKey(evt.Value.(sd.Instance).Domain+"/"+
+   evt.Value.(sd.Instance).Project, ms.ServiceId)
+   serviceKv := dump.KV{
+   Key:   serviceKey,
+   Value: ms,
+   }
+
+   dService := dump.Microservice{
+   KV:,
+   Value: ms,
+   }
+
+   instEvent := {
+   Action:   string(evt.Type),
+   Service:  ,
+   Instance: ,
+   }
+   syncernotify.GetSyncerNotifyCenter().AddEvent(instEvent)
+
+   

[GitHub] [servicecomb-java-chassis] codecov-io commented on pull request #2177: [SCB-2171]avoid leak server ip when process TimeoutException

2020-12-29 Thread GitBox


codecov-io commented on pull request #2177:
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/2177#issuecomment-751993410


   # 
[Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2177?src=pr=h1)
 Report
   > Merging 
[#2177](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2177?src=pr=desc)
 (acaf34a) into 
[master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/f6b0bde6652c19ceb7f4d4d81a9bcba461f48128?el=desc)
 (f6b0bde) will **increase** coverage by `0.12%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2177/graphs/tree.svg?width=650=150=pr=KXfDcr9rX2)](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2177?src=pr=tree)
   
   ```diff
   @@ Coverage Diff  @@
   ## master#2177  +/-   ##
   
   + Coverage 80.24%   80.37%   +0.12% 
 Complexity 1339 1339  
   
 Files  1494 1483  -11 
 Lines 4060240299 -303 
 Branches   3449 3433  -16 
   
   - Hits  3258332391 -192 
   + Misses 6548 6452  -96 
   + Partials   1471 1456  -15 
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2177?src=pr=tree)
 | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | 
[...rvicecomb/demo/jaxrs/client/TestClientTimeout.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2177/diff?src=pr=tree#diff-ZGVtby9kZW1vLWpheHJzL2pheHJzLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvZGVtby9qYXhycy9jbGllbnQvVGVzdENsaWVudFRpbWVvdXQuamF2YQ==)
 | `95.12% <100.00%> (ø)` | `7.00 <0.00> (ø)` | |
   | 
[...icecomb/demo/springmvc/client/SpringmvcClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2177/diff?src=pr=tree#diff-ZGVtby9kZW1vLXNwcmluZ212Yy9zcHJpbmdtdmMtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZXJ2aWNlY29tYi9kZW1vL3NwcmluZ212Yy9jbGllbnQvU3ByaW5nbXZjQ2xpZW50LmphdmE=)
 | `83.58% <100.00%> (+0.10%)` | `21.00 <0.00> (ø)` | |
   | 
[...e/servicecomb/transport/highway/HighwayClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2177/diff?src=pr=tree#diff-dHJhbnNwb3J0cy90cmFuc3BvcnQtaGlnaHdheS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvdHJhbnNwb3J0L2hpZ2h3YXkvSGlnaHdheUNsaWVudC5qYXZh)
 | `96.55% <100.00%> (+0.06%)` | `0.00 <0.00> (ø)` | |
   | 
[...ansport/rest/client/http/RestClientInvocation.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2177/diff?src=pr=tree#diff-dHJhbnNwb3J0cy90cmFuc3BvcnQtcmVzdC90cmFuc3BvcnQtcmVzdC1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3RyYW5zcG9ydC9yZXN0L2NsaWVudC9odHRwL1Jlc3RDbGllbnRJbnZvY2F0aW9uLmphdmE=)
 | `94.66% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | 
[...ache/servicecomb/foundation/common/net/IpPort.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2177/diff?src=pr=tree#diff-Zm91bmRhdGlvbnMvZm91bmRhdGlvbi1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2ZvdW5kYXRpb24vY29tbW9uL25ldC9JcFBvcnQuamF2YQ==)
 | `90.00% <0.00%> (-3.34%)` | `0.00% <0.00%> (ø%)` | |
   | 
[...ache/servicecomb/kie/client/http/HttpResponse.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2177/diff?src=pr=tree#diff-Y2xpZW50cy9raWUtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZXJ2aWNlY29tYi9raWUvY2xpZW50L2h0dHAvSHR0cFJlc3BvbnNlLmphdmE=)
 | | | |
   | 
[...pache/servicecomb/kie/client/http/HttpRequest.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2177/diff?src=pr=tree#diff-Y2xpZW50cy9raWUtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZXJ2aWNlY29tYi9raWUvY2xpZW50L2h0dHAvSHR0cFJlcXVlc3QuamF2YQ==)
 | | | |
   | 
[...rg/apache/servicecomb/kie/client/KieRawClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2177/diff?src=pr=tree#diff-Y2xpZW50cy9raWUtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZXJ2aWNlY29tYi9raWUvY2xpZW50L0tpZVJhd0NsaWVudC5qYXZh)
 | | | |
   | 
[...servicecomb/kie/client/model/LabelDocResponse.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2177/diff?src=pr=tree#diff-Y2xpZW50cy9raWUtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZXJ2aWNlY29tYi9raWUvY2xpZW50L21vZGVsL0xhYmVsRG9jUmVzcG9uc2UuamF2YQ==)
 | | | |
   | 
[...org/apache/servicecomb/kie/client/model/KVDoc.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2177/diff?src=pr=tree#diff-Y2xpZW50cy9raWUtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZXJ2aWNlY29tYi9raWUvY2xpZW50L21vZGVsL0tWRG9jLmphdmE=)
 | | | |
   | ... and [6 
more](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2177/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 

[GitHub] [servicecomb-java-chassis] liubao68 opened a new pull request #2177: [SCB-2171]avoid leak server ip when process TimeoutException

2020-12-29 Thread GitBox


liubao68 opened a new pull request #2177:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2177


   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.

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