little-cui commented on a change in pull request #253: SCB-269 dependency use
domain-project-env level lock
URL:
https://github.com/apache/incubator-servicecomb-service-center/pull/253#discussion_r162909536
##########
File path: server/service/util/dependency.go
##########
@@ -1112,3 +1053,11 @@ func (dr *DependencyRelation)
getConsumerOfSameServiceNameAndAppId(provider *pb.
}
return allConsumers, nil
}
+
+func DependencyLock(lockKey string) (*etcdsync.DLock, error) {
+ return mux.Lock(mux.MuxType(lockKey))
+}
+
+func NewDependencyLockKey(domainProject, env string) string {
Review comment:
????NewDependencyLockKey?????DependencyLock?????????
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services