robotLJW commented on a change in pull request #782:
URL:
https://github.com/apache/servicecomb-service-center/pull/782#discussion_r540749531
##########
File path: datasource/mongo/ms.go
##########
@@ -1910,14 +1922,53 @@ func registryInstance(ctx context.Context, request
*pb.RegisterInstanceRequest)
}, err
}
- log.Infof("register instance %s, instanceID %s, operator %s",
- instanceFlag, insertRes.InsertedID, remoteIP)
+ log.Info(fmt.Sprintf("register instance %s, instanceID %s, operator %s",
+ instanceFlag, insertRes.InsertedID, remoteIP))
return &pb.RegisterInstanceResponse{
Response: pb.CreateResponse(pb.ResponseSuccess, "Register
service instance successfully."),
InstanceId: instanceID,
}, nil
}
+func (ds *DataSource) findSharedServiceInstance(ctx context.Context, request
*pb.FindInstancesRequest, provider *pb.MicroServiceKey)
(*pb.FindInstancesResponse, error) {
+ var err error
+ // it means the shared micro-services must be the same env with SC.
+ provider.Environment = core.Service.Environment
+ findFlag := fmt.Sprintf("find shared provider[%s/%s/%s/%s]",
provider.Environment, provider.AppId, provider.ServiceName, provider.Version)
+ services, err := findServices(ctx, provider)
+ if err != nil {
+ log.Error(fmt.Sprintf("FindInstances.Get failed %s failed",
findFlag), err)
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:
[email protected]