little-cui commented on a change in pull request #1265:
URL: 
https://github.com/apache/servicecomb-service-center/pull/1265#discussion_r806696150



##########
File path: datasource/manager.go
##########
@@ -52,7 +53,7 @@ func Init(opts Options) error {
        if err != nil {
                return err
        }
-       err = GetSyncManager().SyncAll(context.Background())
+       err = GetSyncManager().SyncAll(sync.SetContext(context.Background()))

Review comment:
       应该放SyncAll里面,调用者不需要理解

##########
File path: datasource/etcd/sync.go
##########
@@ -57,6 +57,7 @@ func (s *SyncManager) SyncAll(ctx context.Context) error {
        if !enable {
                return nil
        }
+       putil.SetContext(ctx, putil.CtxEnableSync, "1")

Review comment:
       写个UT保护此场景




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to