hugowan / maatkit

Automatically exported from code.google.com/p/maatkit
0 stars 0 forks source link

mk-table-sync should use ORDER BY #71

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If this is a problem report, what steps will reproduce the problem?
1. update mysql cluster with ndb API
2. mk-table-sync between 2 clusters with replication enabled

What is the expected output? What do you see instead?
DELETE of existing records

What information do you get from mk-<toolname>--version?
mk-table-sync  Ver 1.0.8 Distrib 2152 Changeset 2146

What is your MySQL, Perl, DBI, and DBD::mysql version?
mysql 5.1.22rc
libdbd-mysql-5.1-perl 3.0008

What is your operating system/distribution?
debian etch

If you think it'll be useful, please run the tool with MKDEBUG=1 and
capture the full output in a file, then attach the file.  For example,
MKDEBUG=1 mk-<toolname> [options] > debug.txt.  Is there anything in this
file that you think we should pay special attention to?  Please gzip the
file if it's large.

# RowDiff:1231 5712 Key comparison on left and right: 1
# RowDiff:1246 5712 Right is not in left
# TableSyncChunk:2659 5712 State 2, key cols id
# ChangeHandler:1662 5712 DELETE where `id`=3
# RowDiff:1231 5712 Key comparison on left and right: -1
# RowDiff:1241 5712 Left is not in right
# TableSyncChunk:2659 5712 State 2, key cols id
# ChangeHandler:1662 5712 INSERT where `id`=16

Please provide any additional information below.

FOR INSERT cases : I think that as application is updating data using NDB
API, it's not right now visible to mysqld on the master site, but maybe
it's available on the slave site cause replication is fast

It should be written in documentation that mk-table-sync can fail in
cluster replication architecture if NDB is used.

FOR DELETE cases : I can't understand this case. Are you ordering the rows
before comparing them ? Cause In MySQL Cluster the order can differ between
2 same SELECT if you don't order them

Original issue reported on code.google.com by cscet...@gmail.com on 17 Sep 2008 at 4:37

GoogleCodeExporter commented 9 years ago
I think mk-table-sync's behavior with NDB Cluster is virtually unknown.  There 
are
probably a lot of special cases to consider.

Original comment by baron.schwartz on 19 Sep 2008 at 2:22

GoogleCodeExporter commented 9 years ago

Original comment by baron.schwartz on 1 Oct 2008 at 3:13

GoogleCodeExporter commented 9 years ago
Issue 127 has been merged into this issue.

Original comment by baron.schwartz on 25 Dec 2008 at 10:09

GoogleCodeExporter commented 9 years ago
This is an issue in ordinary MySQL servers too.  See issue 127; there are 
important
comments there.  There are not enough resources to devote to this issue right 
now, so
if it's important to you, consider sponsoring the development to fix it, or 
submit a
well-tested patch.

Summary was: mk-table-sync reports a lot of statement to execute in a 2 clusters
w/replication architecture

Original comment by baron.schwartz on 25 Dec 2008 at 10:13

GoogleCodeExporter commented 9 years ago
Target these for release end of January 2009.

Original comment by baron.schwartz on 4 Jan 2009 at 5:04

GoogleCodeExporter commented 9 years ago
Remove old milestone label.

Original comment by dan...@percona.com on 1 Jul 2009 at 2:11

GoogleCodeExporter commented 9 years ago

Original comment by dan...@percona.com on 1 Jul 2009 at 2:14

GoogleCodeExporter commented 9 years ago

Original comment by dan...@percona.com on 2 Sep 2009 at 2:26

GoogleCodeExporter commented 9 years ago
what does these no comment changes mean ?

Original comment by cscet...@gmail.com on 2 Sep 2009 at 8:27

GoogleCodeExporter commented 9 years ago
They mean we've changed a label, like changing Type-Enhancement to Type-Defect, 
or
adding/removing a milestone label.  So, they're "administrative" stuff.

Original comment by dan...@percona.com on 3 Sep 2009 at 12:33

GoogleCodeExporter commented 9 years ago
patch against 4623 for:
 * making Nibble method work by adding ORDER BY;
 * missing crc's initialisation.

Original comment by vova.kol...@gmail.com on 15 Sep 2009 at 9:16

Attachments:

GoogleCodeExporter commented 9 years ago
The latest mk-table-sync now does ORDER BY key_cols.  Can the original poster 
try the
newest version?

Removed Aug'09 milestone label.

Original comment by dan...@percona.com on 2 Oct 2009 at 2:58

GoogleCodeExporter commented 9 years ago
ORDER BY fix confirmed, 
thank you.

Original comment by vova.kol...@gmail.com on 2 Oct 2009 at 6:31

GoogleCodeExporter commented 9 years ago
Thanks for confirming this.

Original comment by dan...@percona.com on 26 Oct 2009 at 4:31

GoogleCodeExporter commented 9 years ago
thank you for the patch !

Original comment by cscet...@gmail.com on 9 Sep 2010 at 8:50