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 <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to