You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pegasus.apache.org by ji...@apache.org on 2022/06/16 07:34:03 UTC

[incubator-pegasus] 08/25: update

This is an automated email from the ASF dual-hosted git repository.

jiashuo pushed a commit to branch add-table-migrator
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git

commit dbbf44c0285f2cfc6701890656b3586a70b14929
Author: jiashuo <js...@live.com>
AuthorDate: Wed Jun 15 19:16:07 2022 +0800

    update
---
 admin-cli/executor/toolkits/tablemigrator/migrator.go | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/admin-cli/executor/toolkits/tablemigrator/migrator.go b/admin-cli/executor/toolkits/tablemigrator/migrator.go
index 71d07876..313c9cb7 100644
--- a/admin-cli/executor/toolkits/tablemigrator/migrator.go
+++ b/admin-cli/executor/toolkits/tablemigrator/migrator.go
@@ -35,7 +35,7 @@ func MigrateTable(client *executor.Client, table string, metaProxyZkAddrs string
 		if perf == nil {
 			return fmt.Errorf("get perf-node failed, node=%s", n.TCPAddr())
 		}
-		perfSessions = append(perfSessions, client.Nodes.GetPerfSession(n.TCPAddr(), session.NodeTypeReplica))
+		perfSessions = append(perfSessions, perf)
 	}
 	err = checkUnConfirmedDecree(perfSessions, 5000)
 	if err != nil {
@@ -74,8 +74,14 @@ func checkUnConfirmedDecree(perfSessions []*aggregate.PerfSession, threshold flo
 	completed := false
 	for !completed {
 		completed = true
-		time.Sleep(10 * time.Second)
+		time.Sleep(1 * time.Second)
 		for _, perf := range perfSessions {
+			if perf == nil {
+				return fmt.Errorf("perf err")
+			}
+			if perf.NodeSession == nil {
+				return fmt.Errorf("session err")
+			}
 			stats, err := perf.GetPerfCounters("pending_mutations_count")
 			if err != nil {
 				return err


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pegasus.apache.org
For additional commands, e-mail: commits-help@pegasus.apache.org