Open GoogleCodeExporter opened 9 years ago
verified as described.
Either Tungsten has wrong assumption about the results, or there is a bug in
MariaDB
Original comment by g.maxia
on 15 Feb 2013 at 8:37
This issue was closed by revision r1212.
Original comment by stephane...@continuent.com
on 22 Feb 2013 at 12:18
Tomas,
Thanks for the detailed bug report.
It should now be fixed. Please let me know if that works for you.
Cheers
Stephane
Original comment by stephane...@continuent.com
on 22 Feb 2013 at 12:19
Thanks for answering Stephane. With these simple tables, it works fine.
However, it fails on 2 tables, while both tables have 'timestamp' types (maybe
the problem lies somewhere else, but this was what I could narrow down to):
tbl1:
+------------+-----------+------+-----+-------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+-----------+------+-----+-------------------+----------------+
| c1 | int(11) | NO | PRI | NULL | auto_increment |
| c2 | int(11) | NO | | NULL | |
| c3 | int(11) | YES | | NULL | |
| c4 | char(1) | NO | | A | |
| c5 | timestamp | NO | | CURRENT_TIMESTAMP | |
| c6 | timestamp | YES | | NULL | |
| c7 | int(11) | YES | | 0 | |
+------------+-----------+------+-----+-------------------+----------------+
tbl2:
+------------+--------------+------+-----+-------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+-------------------+----------------+
| c1 | int(11) | NO | PRI | NULL | auto_increment |
| c2 | int(11) | NO | MUL | NULL | |
| c3 | int(11) | YES | | NULL | |
| c4 | char(1) | NO | | A | |
| c5 | varchar(750) | YES | | NULL | |
| c6 | timestamp | NO | | CURRENT_TIMESTAMP | |
| c7 | tinyint(1) | YES | MUL | NULL | |
+------------+--------------+------+-----+-------------------+----------------+
It fails on both, MySQL and MariaDB slaves. I have copied both tables to a
testing machine, however I was only able to reproduce the problem randomly.
Ever since I set:
wrapper.java.additional.5=-Dfile.encoding=UTF8
wrapper.java.additional.6=-Duser.timezone=GMT
I cannot reproduce in the test environment. It fails on production all the time.
Original comment by tomas.mo...@gmail.com
on 25 Feb 2013 at 3:19
Tomas,
Can you post the stack trace of the failure, as well as the show create table ?
Cheers
Stephane
Original comment by stephane...@continuent.com
on 25 Feb 2013 at 3:39
Also, do you see a difference in table contents ? Can you post the difference
you see, if any ?
Original comment by stephane...@continuent.com
on 25 Feb 2013 at 3:41
Hello Stephane,
I was able to reproduce the problem in the test environment. I have a MySQL
master and a MySQL + MariaDB slave. If all systems use UTC (/etc/localtime),
the consistency checking runs fine. If however the system time is
Europe/Bratislava (our case), the consistency check fails on both slaves. I'm
trying to build up a minimal test case for verification.
Original comment by tomas.mo...@gmail.com
on 26 Feb 2013 at 9:48
Seems the problem I'm describing is related to timezone. I've posted the
problem in the discussion:
https://groups.google.com/forum/?fromgroups=#!topic/tungsten-replicator-discuss/
-vL3OcvabxY
Original comment by tomas.mo...@gmail.com
on 26 Feb 2013 at 3:36
I have fixed the problem with timezones (by switching to row binlog), but the
consistency check fails again. The data are the same, the dump shows the same
data (except that some of the rows are in different order). I have setup
debugging on the consistency check and tried the query:
SELECT CONCAT_WS(columns) AS this_crc FROM (SELECT * FROM db.table LOCK IN
SHARE MODE) AS tungsten_consistency_check_tmp ORDER BY `PK`;
It gives the same data on master and the slave.
INFO | jvm 1 | 2013/03/04 08:47:25 | 2013-03-04 08:47:24,994 [instance -
q-to-dbms-0] DEBUG consistency.ConsistencyCheckMD5
org.drizzle.jdbc.DrizzleResultSet@f964ca1
INFO | jvm 1 | 2013/03/04 08:47:25 | 2013-03-04 08:47:24,994 [instance -
q-to-dbms-0] DEBUG consistency.ConsistencyCheckMD5 Warnings: null
INFO | jvm 1 | 2013/03/04 08:47:25 | 2013-03-04 08:47:24,996 [instance -
pool-2-thread-1] ERROR management.OpenReplicatorManager Received error
notification, shutting down services :
INFO | jvm 1 | 2013/03/04 08:47:25 | Stage task failed: q-to-dbms
INFO | jvm 1 | 2013/03/04 08:47:25 |
com.continuent.tungsten.replicator.consistency.ConsistencyException:
Consistency check failed on table 'db.table' id: 12, offset: -1, limit: -1,
method: 'md5' failed:
INFO | jvm 1 | 2013/03/04 08:47:25 | this_cnt : 287130
INFO | jvm 1 | 2013/03/04 08:47:25 | master_cnt: 287130
INFO | jvm 1 | 2013/03/04 08:47:25 | this_crc :
2cc639961e0e976603c9cecd79d39f30
INFO | jvm 1 | 2013/03/04 08:47:25 | master_crc:
40cf081ed5edbb1aad826379579d6520
INFO | jvm 1 | 2013/03/04 08:47:25 | at
com.continuent.tungsten.replicator.applier.JdbcApplier.consistencyCheck(JdbcAppl
ier.java:342)
INFO | jvm 1 | 2013/03/04 08:47:25 | at
com.continuent.tungsten.replicator.applier.JdbcApplier.apply(JdbcApplier.java:13
61)
INFO | jvm 1 | 2013/03/04 08:47:25 | at
com.continuent.tungsten.replicator.applier.ApplierWrapper.apply(ApplierWrapper.j
ava:101)
INFO | jvm 1 | 2013/03/04 08:47:25 | at
com.continuent.tungsten.replicator.pipeline.SingleThreadStageTask.apply(SingleTh
readStageTask.java:639)
INFO | jvm 1 | 2013/03/04 08:47:25 | at
com.continuent.tungsten.replicator.pipeline.SingleThreadStageTask.runTask(Single
ThreadStageTask.java:468)
INFO | jvm 1 | 2013/03/04 08:47:25 | at
com.continuent.tungsten.replicator.pipeline.SingleThreadStageTask.run(SingleThre
adStageTask.java:167)
INFO | jvm 1 | 2013/03/04 08:47:25 | at
java.lang.Thread.run(Thread.java:679)
INFO | jvm 1 | 2013/03/04 08:47:25 | 2013-03-04 08:47:24,998 [instance -
pool-2-thread-1] WARN management.OpenReplicatorManager Performing emergency
service shutdown
INFO | jvm 1 | 2013/03/04 08:47:25 | 2013-03-04 08:47:24,998 [instance -
pool-2-thread-1] INFO pipeline.Pipeline Shutting down pipeline: slave
INFO | jvm 1 | 2013/03/04 08:47:25 | 2013-03-04 08:47:24,998 [instance -
q-to-dbms-0] INFO pipeline.SingleThreadStageTask Unexpected error: Stage task
failed: q-to-dbms
INFO | jvm 1 | 2013/03/04 08:47:25 |
com.continuent.tungsten.replicator.consistency.ConsistencyException:
Consistency check failed on table 'db.table' id: 12, offset: -1, limit: -1,
method: 'md5' failed:
INFO | jvm 1 | 2013/03/04 08:47:25 | this_cnt : 287130
INFO | jvm 1 | 2013/03/04 08:47:25 | master_cnt: 287130
INFO | jvm 1 | 2013/03/04 08:47:25 | this_crc :
2cc639961e0e976603c9cecd79d39f30
INFO | jvm 1 | 2013/03/04 08:47:25 | master_crc:
40cf081ed5edbb1aad826379579d6520
INFO | jvm 1 | 2013/03/04 08:47:25 | at
com.continuent.tungsten.replicator.applier.JdbcApplier.consistencyCheck(JdbcAppl
ier.java:342)
INFO | jvm 1 | 2013/03/04 08:47:25 | at
com.continuent.tungsten.replicator.applier.JdbcApplier.apply(JdbcApplier.java:13
61)
INFO | jvm 1 | 2013/03/04 08:47:25 | at
com.continuent.tungsten.replicator.applier.ApplierWrapper.apply(ApplierWrapper.j
ava:101)
INFO | jvm 1 | 2013/03/04 08:47:25 | at
com.continuent.tungsten.replicator.pipeline.SingleThreadStageTask.apply(SingleTh
readStageTask.java:639)
INFO | jvm 1 | 2013/03/04 08:47:25 | at
com.continuent.tungsten.replicator.pipeline.SingleThreadStageTask.runTask(Single
ThreadStageTask.java:468)
INFO | jvm 1 | 2013/03/04 08:47:25 | at
com.continuent.tungsten.replicator.pipeline.SingleThreadStageTask.run(SingleThre
adStageTask.java:167)
INFO | jvm 1 | 2013/03/04 08:47:25 | at
java.lang.Thread.run(Thread.java:679)
Original comment by tomas.mo...@gmail.com
on 4 Mar 2013 at 8:45
The checking was done on Tungsten Replicator 2.0.8 build 20.
Original comment by tomas.mo...@gmail.com
on 4 Mar 2013 at 8:47
Re opening since it seems it can still fail under other conditions.
Original comment by stephane...@continuent.com
on 19 Mar 2013 at 1:39
Original issue reported on code.google.com by
tomas.mo...@gmail.com
on 15 Feb 2013 at 8:32