You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/12/08 10:06:13 UTC

[GitHub] [servicecomb-service-center] tianxiaoliang commented on a change in pull request #779: SCB-2094 add schema/rule/service ut

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



##########
File path: datasource/mongo/mongo.go
##########
@@ -88,3 +97,24 @@ func (ds *DataSource) initClient() error {
 		return nil
 	}
 }
+
+func (ds *DataSource) createIndexes() (err error) {
+	err = client.GetMongoClient().CreateIndexes(context.TODO(), CollectionService, []mongo.IndexModel{{
+		Keys:    bsonx.Doc{{Key: StringBuilder([]string{ColumnServiceInfo, ColumnServiceID}), Value: bsonx.Int32(1)}},

Review comment:
       微服务信息,应该有个app,version servicename,env唯一约束,这个索引是否做了




----------------------------------------------------------------
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:
users@infra.apache.org