Uploaded image for project: 'Percona Toolkit'
  1. Percona Toolkit
  2. PT-1502

``pt-online-schema-change`` was not recognizing the slave with multi-source replication active.

    XMLWordPrintable

    Details

      Description

      pt-oscĀ is not recognizing the slave when the slave has MSR active. Both --check-slave and --recursion-method fails.

      With --recursion-method:

      $ pt-online-schema-change --socket=/tmp/mysql_sandbox45007.sock --user msandbox --password msandbox --execute \
      > --alter "ADD placeOfServiceCategor1121 BIGINT(19)" D=test,t=joinit --alter-foreign-keys-method=auto --recursion-method=hosts
      Cannot connect to D=test,P=45009,S=/tmp/mysql_sandbox45007.sock,h=SBslave2,p=...,u=msandbox
      No slaves found. See --recursion-method if host bm-support01 has slaves.
      Not checking slave lag because no slaves were found and --check-slave-lag was not specified.
      Operation, tries, wait:
      analyze_table, 10, 1
      copy_rows, 10, 0.25
      create_triggers, 10, 1
      drop_triggers, 10, 1
      swap_tables, 10, 1
      update_foreign_keys, 10, 1
      No foreign keys reference `test`.`joinit`; ignoring --alter-foreign-keys-method.
      Altering `test`.`joinit`...
      Creating new table...
      Created new table test.____joinit_new OK.
      Altering new table...
      Altered `test`.`____joinit_new` OK.
      2018-03-12T16:39:06 Creating triggers...
      2018-03-12T16:39:06 Created triggers OK.
      2018-03-12T16:39:06 Copying approximately 32 rows...
      2018-03-12T16:39:06 Copied rows OK.
      2018-03-12T16:39:06 Analyzing new table...
      2018-03-12T16:39:06 Swapping tables...
      2018-03-12T16:39:06 Swapped original and new tables OK.
      2018-03-12T16:39:06 Dropping old table...
      2018-03-12T16:39:06 Dropped old table `test`.`_joinit_old` OK.
      2018-03-12T16:39:06 Dropping triggers...
      2018-03-12T16:39:06 Dropped triggers OK.
      Successfully altered `test`.`joinit`.
      

      With --check-slave:

      $ pt-online-schema-change --socket=/tmp/mysql_sandbox45007.sock --user msandbox --password msandbox --execute --alter "ADD placeOfServiceCate5gor1121 BIGINT(19)" D=test,t=joinit --alter-foreign-keys-method=auto --check-slave-lag h=localhost,S=/tmp/mysql_sandbox45009.sock,u=root,p=msandbox 
      Cannot connect to D=test,S=/tmp/mysql_sandbox45007.sock,h=127.0.0.1,p=...,u=msandbox
      No slaves found. See --recursion-method if host bm-support01 has slaves.
      Will check slave lag on:
      bm-support01 -> localhost:socket
      Operation, tries, wait:
      analyze_table, 10, 1
      copy_rows, 10, 0.25
      create_triggers, 10, 1
      drop_triggers, 10, 1
      swap_tables, 10, 1
      update_foreign_keys, 10, 1
      No foreign keys reference `test`.`joinit`; ignoring --alter-foreign-keys-method.
      Altering `test`.`joinit`...
      Creating new table...
      Created new table test.____joinit_new OK.
      Altering new table...
      Altered `test`.`____joinit_new` OK.
      2018-03-12T16:49:59 Creating triggers...
      2018-03-12T16:49:59 Created triggers OK.
      2018-03-12T16:49:59 Copying approximately 32 rows...
      Replica bm-support01 is stopped. Waiting.
      ^C# Exiting on SIGINT.
      Not dropping triggers because the tool was interrupted. To drop the triggers, execute:
      DROP TRIGGER IF EXISTS `test`.`pt_osc_test_joinit_del`
      DROP TRIGGER IF EXISTS `test`.`pt_osc_test_joinit_upd`
      DROP TRIGGER IF EXISTS `test`.`pt_osc_test_joinit_ins`
      Not dropping the new table `test`.`____joinit_new` because the tool was interrupted. To drop the new table, execute:
      DROP TABLE IF EXISTS `test`.`____joinit_new`;
      `test`.`joinit` was not altered.
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              carlos.salguero Carlos Salguero
              Reporter:
              vinicius.grippa Vinicius Grippa
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Smart Checklist