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 fdd277c037a68e4f7a31ca3623f3c2e497074357
Author: jiashuo <[email protected]>
AuthorDate: Wed Jun 15 19:32:12 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 bfb66bf0..e1c6b20a 100644
--- a/admin-cli/executor/toolkits/tablemigrator/migrator.go
+++ b/admin-cli/executor/toolkits/tablemigrator/migrator.go
@@ -13,6 +13,7 @@ import (
 
 func MigrateTable(client *executor.Client, table string, metaProxyZkAddrs 
string, metaProxyZkRoot string, targetCluster string, targetAddrs string) error 
{
        //1. check data version
+       toolkits.LogDebug("check data version")
        version, err := executor.QueryReplicaDataVersion(client, table)
        if err != nil {
                return err
@@ -22,12 +23,14 @@ func MigrateTable(client *executor.Client, table string, 
metaProxyZkAddrs string
        }
 
        //2. create table duplication
-       /** err = executor.AddDuplication(client, table, targetCluster, true)
+       toolkits.LogDebug(" create table duplication")
+/*      err = executor.AddDuplication(client, table, targetCluster, true)
        if err != nil {
                return err
-       }**/
+       }*/
 
        //3. check un-confirm decree if less 5k
+       toolkits.LogDebug("check un-confirm decree if less 5k")
        nodes := client.Nodes.GetAllNodes(session.NodeTypeReplica)
        var perfSessions []*aggregate.PerfSession
        for _, n := range nodes {
@@ -48,6 +51,7 @@ func MigrateTable(client *executor.Client, table string, 
metaProxyZkAddrs string
                return err
        }
        //4. set env config deny write request
+       toolkits.LogDebug("set env config deny write request")
        var envs = map[string]string{
                "replica.deny_client_request": "timeout*write",
        }
@@ -56,6 +60,7 @@ func MigrateTable(client *executor.Client, table string, 
metaProxyZkAddrs string
                return err
        }
        //5. check duplicate qps if equal 0
+       toolkits.LogDebug("check duplicate qps if equal 0")
        resp, err := client.Meta.QueryConfig(table)
        if err != nil {
                return err
@@ -65,6 +70,7 @@ func MigrateTable(client *executor.Client, table string, 
metaProxyZkAddrs string
                return err
        }
        //6. switch table addrs in metaproxy
+       toolkits.LogDebug("switch table addrs in metaproxy")
        if metaProxyZkRoot == "" {
                toolkits.LogWarn("you don't specify enough meta proxy info, 
please manual-switch the table cluster!")
                return nil


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to