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 2021/06/25 06:08:33 UTC

[GitHub] [servicecomb-service-center] fuziye01 commented on a change in pull request #1070: cache use concurrentmap

fuziye01 commented on a change in pull request #1070:
URL: https://github.com/apache/servicecomb-service-center/pull/1070#discussion_r657950334



##########
File path: datasource/mongo/sd/service_cache.go
##########
@@ -131,10 +160,17 @@ func (s *serviceStore) isValueNotUpdated(value interface{}, newValue interface{}
 	return reflect.DeepEqual(newService, oldService)
 }
 
-func genServiceID(svc model.Service) string {
+func ServiceIDIndex(data interface{}) string {
+	svc := data.(model.Service)
 	return svc.Service.ServiceId

Review comment:
       生成serviceId的索引也得是{domain}/{project}/{serviceId}的形式,不然会出现多域之间serviceId相同的情况,请求中serviceId是可以用户指定的




-- 
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