Ошибка при удалении узла из кластера MySQL InnoDB - PullRequest
0 голосов
/ 23 января 2019

Я пытаюсь удалить один из узлов (вторичный узел) из MySQL InnoDB Cluster (5.7.24), но выдает ошибку. Я пытался сделать то же самое со всех узлов, но получил ту же ошибку.

Может ли кто-нибудь проверить ниже детали и помочь решить эту проблему.

 MySQL  node01:3306 ssl  JS > var c = dba.getCluster()
 MySQL  node01:3306 ssl  JS > c.status()
{
    "clusterName": "dbacluster",
    "defaultReplicaSet": {
        "name": "default",
        "primary": "node01:3306",
        "ssl": "REQUIRED",
        "status": "OK",
        "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",
        "topology": {
            "node01:3306": {
                "address": "node01:3306",
                "mode": "R/W",
                "readReplicas": {},
                "role": "HA",
                "status": "ONLINE"
            },
            "node02:3306": {
                "address": "node02:3306",
                "mode": "R/O",
                "readReplicas": {},
                "role": "HA",
                "status": "ONLINE"
            },
            "node03:3306": {
                "address": "node03:3306",
                "mode": "R/O",
                "readReplicas": {},
                "role": "HA",
                "status": "ONLINE"
            }
        }
    },
    "groupInformationSourceMember": "mysql://clusterAdministrator@node01:3306"
}

 MySQL  node01:3306 ssl  JS > c.removeInstance("clusterAdministrator@node03:3306")
The instance will be removed from the InnoDB cluster. Depending on the instance
being the Seed or not, the Metadata session might become invalid. If so, please
start a new session to the Metadata Storage R/W instance.
Cluster.removeInstance: get_string(7): field is NULL (LogicError)

 MySQL  node01:3306 ssl  JS >

Та же команда выполняется в режиме отладки,

MySQL  localhost:3306 ssl  JS > c.removeInstance("clusterAdministrator@node03:3306")
2019-01-29 22:57:04: Debug: Instance type check: mysql://clusterAdministrator@node01:3306: GR is active
2019-01-29 22:57:04: Debug: Instance type check: mysql://clusterAdministrator@node01:3306: Metadata record found
2019-01-29 22:57:04: Debug: Verifying connection options
2019-01-29 22:57:04: Debug: Checking if the instance belongs to the replicaset
2019-01-29 22:57:04: Debug: DBA: execute_sql('SELECT COUNT(*) as count FROM mysql_innodb_cluster_metadata.instances WHERE replicaset_id = 1 AND addresses->'$.mysqlClassic' = 'node03:3306'')
2019-01-29 22:57:04: Debug: Checking if the instance is the last in the replicaset
2019-01-29 22:57:04: Debug: DBA: execute_sql('SELECT COUNT(*) as count FROM mysql_innodb_cluster_metadata.instances WHERE replicaset_id = 1')
2019-01-29 22:57:04: Debug: Connecting to instance 'node03:3306'
2019-01-29 22:57:04: Debug: Successfully connected to instance
2019-01-29 22:57:04: Debug: Checking user privileges
2019-01-29 22:57:04: Info: Validating account clusterAdministrator@%...
The instance will be removed from the InnoDB cluster. Depending on the instance
being the Seed or not, the Metadata session might become invalid. If so, please
start a new session to the Metadata Storage R/W instance.
2019-01-29 22:57:04: Info: The instance will be removed from the InnoDB cluster. Depending on the instance
being the Seed or not, the Metadata session might become invalid. If so, please
start a new session to the Metadata Storage R/W instance.

2019-01-29 22:57:04: Debug: Saving instance definition
2019-01-29 22:57:04: Debug: DBA: execute_sql('SELECT host_id, replicaset_id, mysql_server_uuid, instance_name, role, weight, JSON_UNQUOTE(JSON_EXTRACT(addresses, '$.mysqlClassic')) as endpoint, JSON_UNQUOTE(JSON_EXTRACT(addresses, '$.mysqlX')) as xendpoint, JSON_UNQUOTE(JSON_EXTRACT(addresses, '$.grLocal')) as grendpoint, addresses, attributes, version_token, description FROM mysql_innodb_cluster_metadata.instances WHERE addresses->'$.mysqlClassic' = 'node03:3306'')
2019-01-29 22:57:04: Error: Cluster.removeInstance: get_string(7): field is NULL
Cluster.removeInstance: get_string(7): field is NULL (LogicError)
2019-01-29 22:57:04: Debug: Cluster.removeInstance: get_string(7): field is NULL (LogicError)

2019-01-29 22:57:04: Debug: Match '*;localhost;*' vs ';;'
2019-01-29 22:57:04: Debug: Match '' vs ''
...