You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2021/03/30 09:58:25 UTC
[servicecomb-service-center] branch master updated: [SCB-2094]
There is no need to send heartbeat when registering an instance (#927)
This is an automated email from the ASF dual-hosted git repository.
littlecui 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 2b3e390 [SCB-2094] There is no need to send heartbeat when registering an instance (#927)
2b3e390 is described below
commit 2b3e390c78895dd927c7f85a92e990fc02afdf4a
Author: robotLJW <79...@qq.com>
AuthorDate: Tue Mar 30 17:58:15 2021 +0800
[SCB-2094] There is no need to send heartbeat when registering an instance (#927)
---
datasource/mongo/ms.go | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/datasource/mongo/ms.go b/datasource/mongo/ms.go
index 7b30d31..185a3ec 100644
--- a/datasource/mongo/ms.go
+++ b/datasource/mongo/ms.go
@@ -1956,17 +1956,6 @@ func registryInstance(ctx context.Context, request *discovery.RegisterInstanceRe
log.Info(fmt.Sprintf("register instance %s, instanceID %s, operator %s",
instanceFlag, insertRes.InsertedID, remoteIP))
- heartbeatRequest := discovery.HeartbeatRequest{
- ServiceId: instance.ServiceId,
- InstanceId: instance.InstanceId,
- }
- aliveErr := KeepAliveLease(ctx, &heartbeatRequest)
- if aliveErr != nil {
- log.Error(fmt.Sprintf("failed to send heartbeat after registering instance, instance %s operator %s", instanceFlag, remoteIP), err)
- return &discovery.RegisterInstanceResponse{
- Response: discovery.CreateResponseWithSCErr(aliveErr),
- }, err
- }
return &discovery.RegisterInstanceResponse{
Response: discovery.CreateResponse(discovery.ResponseSuccess, "Register service instance successfully."),
InstanceId: instanceID,