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/29 06:09:48 UTC

[GitHub] [servicecomb-service-center] tianxiaoliang commented on a change in pull request #800: implement of mongo DumpCache interface and optimization of syncer

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



##########
File path: datasource/mongo/system.go
##########
@@ -35,3 +41,23 @@ func (ds *DataSource) DLock(ctx context.Context, request *datasource.DLockReques
 func (ds *DataSource) DUnlock(ctx context.Context, request *datasource.DUnlockRequest) error {
 	return nil
 }
+
+func setServiceValue(e *sd.MongoCacher, setter dump.Setter) {
+	e.Cache().ForEach(func(k string, kv interface{}) (next bool) {
+		setter.SetValue(&dump.KV{
+			Key:   path.GenerateServiceKey(kv.(sd.Service).Domain+path.SPLIT+kv.(sd.Service).Project, k),

Review comment:
       mongo不该依赖etcd包




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