bigcy / tungsten-replicator

Automatically exported from code.google.com/p/tungsten-replicator
0 stars 0 forks source link

Improve error message #313

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1. To which tool/application/daemon will this feature apply?
replicator

2. Describe the feature in general

When replicator fails to apply a sql statement on the slave it would be useful 
to have the database name in the message to speed up finding the issue

e.g.

WARNING: Could not execute query 
org.drizzle.jdbc.internal.common.query.DrizzleQuery@1584bf1: PROCEDURE 
uptomWaveAmendInstOld already exists
2012-03-15 18:08:13,556 [tr3101 - q-to-dbms-0] ERROR applier.JdbcApplier 
Statement failed: CREATE DEFINER=`root`@`localhost` PROCEDURE 
`uptomWaveAmendInstOld`(
        IN _i_EOSOrdId    varchar(36) BINARY,
        IN _i_OldAllocatedQty    decimal(28,8),
        IN _i_OldAllocState    varchar(23) BINARY,
        IN _i_OldAltOwner    varchar(32) BINARY,
        IN _i_OldAltOwnerType    varchar(10) BINARY,
        IN _i_OldAutoAllocState    varchar(15) BINARY,
        IN _i_OldAvgSpread    decimal(28,8),
        IN _i_OldCaptureDate    decimal(17,3),
        IN _i_OldClrBkr    varchar(12) BINARY,
        IN _i_OldClrBkrType    varchar(10) BINARY,
        IN _i_OldClientData    varchar(255) BINARY,
        IN _i_OldCompletion    decimal(28,8),
        IN _i_OldCounterAltOwner    varchar(32) BINARY,
        IN _i_OldCounterAltOwnerType    varchar(10) BINARY,
        IN _i_OldCounterOwner    varchar(32) BINARY,
        IN _i_OldCounterOwnerType    varchar(10) BINARY,
        IN _i_OldCounterparty    varchar(12) BINARY,
        IN _i_OldCounterpartyType    varchar
2012-03-15 18:08:13,556 [tr3101 - q-to-dbms-0] ERROR 
pipeline.SingleThreadStageTask Event application failed: seqno=135 fragno=0 
message=java.sql.SQLException: Statement failed on s
lave but succeeded on master
com.continuent.tungsten.replicator.applier.ApplierException: 
java.sql.SQLException: Statement failed on slave but succeeded on master
        at com.continuent.tungsten.replicator.applier.JdbcApplier.applyStatementData(JdbcApplier.java:630)

In this case this procedure exists in several databases so I was not sure what 
database to check. If possible could the current DB put put in the warning 
message?

5a. Why the world will be a better place with this feature.
quicker debugging of issues
5b. What hardship will the human race have to endure if this feature is
implemented.
none that i can think of

6. Notes

Original issue reported on code.google.com by neil.arm...@gmail.com on 15 Mar 2012 at 9:25

GoogleCodeExporter commented 9 years ago
Thanks for this feature request.
As a workaround, try this:
when you get this message using 'trepctl status' you should also get a seqno 
with that $SEQNO information, you can ask for the complete THL(transaction 
History Log)  record:

thl -service=$SERVICE_NAME list -seqno $SEQNO

Original comment by g.maxia on 15 Mar 2012 at 9:57