robotLJW commented on a change in pull request #782:
URL:
https://github.com/apache/servicecomb-service-center/pull/782#discussion_r540753889
##########
File path: datasource/mongo/ms.go
##########
@@ -2250,3 +2298,364 @@ func preProcessRegisterInstance(ctx context.Context,
instance *pb.MicroServiceIn
instance.Version = microservice.ServiceInfo.Version
return nil
}
+
+func findServices(ctx context.Context, key *pb.MicroServiceKey) ([]*Service,
error) {
+ tenant := strings.Split(key.Tenant, "/")
+ rangeIdx := strings.Index(key.Version, "-")
+ switch {
+ case key.Version == "latest":
+ filter := bson.M{
+ ColumnDomain: tenant[0],
+ ColumnProject: tenant[1],
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]