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 837d89ba8a6f02c05e9a01da16d1df575ada9b9c
Author: jiashuo <[email protected]>
AuthorDate: Wed Jun 15 19:17:08 2022 +0800

    update
---
 admin-cli/executor/toolkits/tablemigrator/migrator.go | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/admin-cli/executor/toolkits/tablemigrator/migrator.go 
b/admin-cli/executor/toolkits/tablemigrator/migrator.go
index 313c9cb7..8d3cb761 100644
--- a/admin-cli/executor/toolkits/tablemigrator/migrator.go
+++ b/admin-cli/executor/toolkits/tablemigrator/migrator.go
@@ -35,6 +35,9 @@ func MigrateTable(client *executor.Client, table string, 
metaProxyZkAddrs string
                if perf == nil {
                        return fmt.Errorf("get perf-node failed, node=%s", 
n.TCPAddr())
                }
+               if perf.NodeSession == nil {
+                       return fmt.Errorf("session err")
+               }
                perfSessions = append(perfSessions, perf)
        }
        err = checkUnConfirmedDecree(perfSessions, 5000)
@@ -76,12 +79,6 @@ func checkUnConfirmedDecree(perfSessions 
[]*aggregate.PerfSession, threshold flo
                completed = true
                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