Make pt-table-sync more flexible

Registered by Baron Schwartz

pt-table-sync is not flexible enough at present. When you use --sync-to-master or --replicate, it does not give you fine control over which servers it should sync to or from. It only permits a single DSN with --replicate.

A customer (issue 22151) needs this to be relaxed so they can specify exactly which servers to sync in --replicate mode, and additionally to specify different users for each one, due to their security practices of using different user names on each server.

To solve this, add --recursion-method=dsn and permit syncing from a single server to a list of servers specified in a table.

In addition we need to verify that pt-table-sync will respect --ask-pass on every connection it attempts to open. The customer reports that --ask-pass didn't ask for the master's password when using --sync-to-master.

This work is billable to issue 22151 and should be placed into a branch that's not merged into trunk. It may become part of the redesign-pt-table-sync work in the future but we simply need an enhanced copy of pt-table-sync at present.

** WARNING ** Cxn sets $dbh->{FetchHashKeyName} = 'NAME_lc' by default. This should not happen by default and, instead, made optional. See our internal email thread about this.

** WARNING ** pt_table_sync::get_cxn() will be replaced by Cxn and a "set" callback. All the things currently set in get_cxn() will be transferred to a set callback; compare pt-tabe-checksum 1.0 to 2.0 for an example.

--recursion-method=dsn requires the latest MasterSlave which itself requires Cxn.

Blueprint information

Status:
Complete
Approver:
Daniel Nichter
Priority:
High
Drafter:
Baron Schwartz
Direction:
Approved
Assignee:
Daniel Nichter
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Daniel Nichter
Completed by
Daniel Nichter

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.