You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2022/11/07 14:15:14 UTC
[servicecomb-service-center] branch nzx updated: 添加日志,用于双集群引擎同步debug (#1353)
This is an automated email from the ASF dual-hosted git repository.
littlecui pushed a commit to branch nzx
in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git
The following commit(s) were added to refs/heads/nzx by this push:
new a750c7c9 添加日志,用于双集群引擎同步debug (#1353)
a750c7c9 is described below
commit a750c7c944375456d64e80342687b920ffc957cb
Author: kkf1 <46...@users.noreply.github.com>
AuthorDate: Mon Nov 7 22:15:09 2022 +0800
添加日志,用于双集群引擎同步debug (#1353)
---
syncer/service/replicator/replicator.go | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/syncer/service/replicator/replicator.go b/syncer/service/replicator/replicator.go
index 2c9801f5..e8087218 100644
--- a/syncer/service/replicator/replicator.go
+++ b/syncer/service/replicator/replicator.go
@@ -19,7 +19,6 @@ package replicator
import (
"context"
- "encoding/base64"
"encoding/json"
"fmt"
@@ -181,15 +180,9 @@ func (r *replicatorManager) replicate(ctx context.Context, el *v1sync.EventList)
log.Info(fmt.Sprintf("event id: %v", event.Id))
log.Info(fmt.Sprintf("event action:%v", event.Action))
log.Info(fmt.Sprintf("event subject:%v", event.Subject))
- log.Info(fmt.Sprintf("event value:%v", event.Value))
+ log.Info(fmt.Sprintf("event value:%v", string(event.Value)))
log.Info(fmt.Sprintf("event timestamp:%v", event.Timestamp))
- val, err := base64.StdEncoding.DecodeString(string(event.Value))
- if err != nil {
- log.Error(fmt.Sprintf("failed to decode base64 string: %v", string(s)), err)
- continue
- }
- log.Info(fmt.Sprintf("decoded event value: %s\n\n", string(val)))
}
for k, v := range res.Results {
@@ -221,14 +214,7 @@ func (r *replicatorManager) Persist(ctx context.Context, el *v1sync.EventList) [
log.Info(fmt.Sprintf("event action:%v", event.Action))
log.Info(fmt.Sprintf("event subject:%v", event.Subject))
log.Info(fmt.Sprintf("event timestamp:%v", event.Timestamp))
- log.Info(fmt.Sprintf("event value:%v", event.Value))
-
- val, err := base64.StdEncoding.DecodeString(string(event.Value))
- if err != nil {
- log.Error(fmt.Sprintf("failed to decode base64 string: %v", string(s)), err)
- continue
- }
- log.Info(fmt.Sprintf("decoded event value: %s\n\n", string(val)))
+ log.Info(fmt.Sprintf("event value:%v", string(event.Value)))
r, result := resource.New(event)
if result != nil {