pt-archiver cannot sync max id record

Bug #1706250 reported by it--bro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Invalid
Undecided
Unassigned

Bug Description

pt-archiver doesn't work when i sync data from one table to another table.please look at it:

The version of pt
[root@redis02 ~]# pt-archiver --version
pt-archiver 2.2.19

root@10.0.0.6:3306 12:49:58 [(none)]>select count(*) from test;
+----------+
| count(*) |
+----------+
| 88787 |
+----------+
1 row in set (0.09 sec)

[root@redis02 ~]# pt-archiver --source h=10.0.0.6,u=root,p=123456,D=tom,t=test,A=utf8 --dest h=10.0.0.7,P=3306,D=tom,t=test --where "1=1" --share-lock --statistics --progress 5000 --limit 5000 --txn-size 5000
...
...
SELECT 88786
INSERT 88786
DELETE 88786
...
...

Less a record????check the source table

root@localhost:mysql.sock 10:40:51 [tom]>select * from test;
+-------+------------+------+---------------------+
| id | name | age | createtime |
+-------+------------+------+---------------------+
| 88787 | hello88787 | 83 | 2017-07-19 17:24:21 |
+-------+------------+------+---------------------+
1 row in set (0.00 sec)

yes,really lost a record,at last,i solve the problem with motified the pt-archiver
[root@redis02 ~]# sed -n '6257p' /usr/bin/pt-archiver
      $first_sql .= " AND ($col < " . $q->quote_val($val) . ")";
[root@redis02 ~]# sed -n '6257p' /usr/bin/pt-archiver
      $first_sql .= " AND ($col <= " . $q->quote_val($val) . ")";

ok,the problem solve

Revision history for this message
Carlos Salguero (carlos-salguero) wrote :

Please, could you post the result of:
SHOW CREATE TABLE test;

Revision history for this message
Carlos Salguero (carlos-salguero) wrote :

The last row is not being deleted because of the --[no]safe-auto-increment.
You can read more about it at https://www.percona.com/doc/percona-toolkit/3.0/pt-archiver.html

Changed in percona-toolkit:
status: New → Invalid
Revision history for this message
it--bro (it--bro) wrote :

thanks for your reply,i resolved by add --[no]safe-auto-increment

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1434

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.