pt-table-checksum depends on unique server-id even for PXC nodes

Bug #1273428 reported by Ovais Tariq
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Confirmed
Undecided
Unassigned

Bug Description

pt-table-checksum checks for unique server-id values when connecting to nodes defined either in the dsns tables when recursion-method=dsn is used or when recursion-method=cluster is used. However, it is perfectly fine for PXC nodes to have the same server-id. Since Galera does not require nodes to have different server-id.

I suppose this check has carried through the checks are done on slaves in a regular async replication topology.

This is true for latest pt-table-checksum version 2.2.6

This can be seen when running pt-table-checksum with PTDEBUG=1

# Cxn:3648 8272 Removing duplicates from pxc01 pxc01 pxc02 pxc03
# Cxn:3654 8272 SELECT @@server_id
# Cxn:3656 8272 Server ID for pxc01 : 1
# Cxn:3654 8272 SELECT @@server_id
# Cxn:3656 8272 Server ID for pxc01 : 1
# Cxn:3662 8272 Removing pxc01 , ID 1 , because we've already seen it
# Cxn:3654 8272 SELECT @@server_id
# Cxn:3656 8272 Server ID for pxc02 : 1
# Cxn:3662 8272 Removing pxc02 , ID 1 , because we've already seen it
# Cxn:3654 8272 SELECT @@server_id
# Cxn:3656 8272 Server ID for pxc03 : 1
# Cxn:3662 8272 Removing pxc03 , ID 1 , because we've already seen it
# Cxn:3673 8272 Destroying cxn
# Cxn:3682 8272 DBI::db=HASH(0x16b6b18) Disconnecting dbh on pxc03 h=192.168.90.6
# Cxn:3673 8272 Destroying cxn
# Cxn:3682 8272 DBI::db=HASH(0x16b1e88) Disconnecting dbh on pxc02 h=192.168.90.5
# Cxn:3673 8272 Destroying cxn
# Cxn:3682 8272 DBI::db=HASH(0x16b1ed0) Disconnecting dbh on pxc01 h=192.168.90.4
# pt_table_checksum:9300 8272 0 slaves found
Diffs cannot be detected because no slaves were found. Please read the --recursion-method documentation for information.
# VersionParser:4156 8272 VersionParser got a dbh, trying to get the version
# VersionParser:4204 8272 InnoDB support: DEFAULT
# VersionParser:4216 8272 InnoDB version: 5.5.31-rel30.3
pxc01 is a cluster node but no other nodes or regular replicas were found. Use --recursion-method=dsn to specify the other nodes in the cluster.
# Cxn:3673 8272 Destroying cxn
# Cxn:3682 8272 DBI::db=HASH(0x16a77e8) Disconnecting dbh on pxc01 h=192.168.90.4

tags: added: i38589
tags: added: pt-table-checksum
Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :

Able to reproduce with PXC 5.5, pt-table-checksum 2.2.10 and PTDEBUG=1

# Percona::XtraDB::Cluster:3711 1513 percona-pxc55-2 SHOW VARIABLES LIKE 'wsrep_cluster_name'
# Cxn:3631 1513 Removing duplicates from percona-pxc55-1 percona-pxc55-2
# Cxn:3637 1513 SELECT @@server_id
# Cxn:3639 1513 Server ID for percona-pxc55-1 : 1
# Cxn:3645 1513 Removing percona-pxc55-1 , ID 1 , because we've already seen it
# Cxn:3637 1513 SELECT @@server_id
# Cxn:3639 1513 Server ID for percona-pxc55-2 : 1
# Cxn:3645 1513 Removing percona-pxc55-2 , ID 1 , because we've already seen it
# Cxn:3656 1513 Destroying cxn
# Cxn:3665 1513 DBI::db=HASH(0x1ecca88) Disconnecting dbh on percona-pxc55-2 h=192.168.43.61,P=3306
# Cxn:3656 1513 Destroying cxn
# Cxn:3665 1513 DBI::db=HASH(0x1ec9dd8) Disconnecting dbh on percona-pxc55-1 h=192.168.43.60,P=3306
# Cxn:3631 1513 Removing duplicates from
# Cxn:3631 1513 Removing duplicates from percona-pxc55-1
# Cxn:3637 1513 SELECT @@server_id
# Cxn:3639 1513 Server ID for percona-pxc55-1 : 1
# pt_table_checksum:9317 1513 0 slaves found
Diffs cannot be detected because no cluster nodes were found. Please read the --recursion-method documentation for information.
# VersionParser:4139 1513 VersionParser got a dbh, trying to get the version
# VersionParser:4187 1513 InnoDB support: DEFAULT
# VersionParser:4199 1513 InnoDB version: 5.5.39-36.0
percona-pxc55-1 is a cluster node but no other nodes or regular replicas were found. Use --recursion-method=dsn to specify the other nodes in the cluster.
# Cxn:3656 1513 Destroying cxn
# Cxn:3665 1513 DBI::db=HASH(0x1ebca88) Disconnecting dbh on percona-pxc55-1 h=localhost
[root@percona-pxc55-1 mysql]#
[root@percona-pxc55-1 mysql]#
[root@percona-pxc55-1 mysql]# pt-table-checksum --version
pt-table-checksum 2.2.10
[root@percona-pxc55-1 mysql]#

Changed in percona-toolkit:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.