tianxiaoliang commented on a change in pull request #228:
URL: https://github.com/apache/servicecomb-kie/pull/228#discussion_r757186394



##########
File path: server/datasource/etcd/kv/kv_dao.go
##########
@@ -60,17 +69,24 @@ func (s *Dao) Create(ctx context.Context, kv *model.KVDoc) 
(*model.KVDoc, error)
 }
 
 //Update update key value
-func (s *Dao) Update(ctx context.Context, kv *model.KVDoc) error {
-       keyKv := key.KV(kv.Domain, kv.Project, kv.ID)
-       resp, err := etcdadpt.Get(ctx, keyKv)
+func (s *Dao) Update(ctx context.Context, kv *model.KVDoc, options 
...datasource.CUDOption) error {
+       opts := datasource.NewDefaultCUDOpts()
+       for _, op := range options {
+               op(&opts)
+       }
+       // if syncEnable is true, will create kv with task
+       if opts.SyncEnable {
+               return s.updateWithTask(ctx, kv)

Review comment:
       这里必须是createWithTask




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