Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventDataDeserializationException on EXT_WRITE_ROWS Event #26

Closed
e7868a opened this issue Dec 5, 2014 · 2 comments
Closed

EventDataDeserializationException on EXT_WRITE_ROWS Event #26

e7868a opened this issue Dec 5, 2014 · 2 comments

Comments

@e7868a
Copy link

e7868a commented Dec 5, 2014

I had a problem in my replication. the connector said "onCommunicationFailure" with an EventDataDeserializationException caused by a EOFException.

I viewd the source, Maybe there is a bug in AbstractRowsEventDataDeserializer.deserializeRow.

 protected Serializable[] deserializeRow(long tableId, BitSet includedColumns, ByteArrayInputStream inputStream)
            throws IOException {
        TableMapEventData tableMapEvent = tableMapEventByTableId.get(tableId);
        byte[] types = tableMapEvent.getColumnTypes();
        int[] metadata = tableMapEvent.getColumnMetadata();
        BitSet nullColumns = inputStream.readBitSet(types.length, true);         <====   THIS LINE
        Serializable[] result = new Serializable[numberOfBitsSet(includedColumns)];
}

this is the sql i dumped use mysqlbinlog

# at 397578054
#141204 16:56:25 server id 88  end_log_pos 397578178 CRC32 0xba421d48   Write_rows: table id 51337798 flags: STMT_END_F

BINLOG '
uSGAVBNYAAAAswAAAEaPshcAAEZaDwMAAAEADWNpdHlyZV9iYW90b3UAFllpZWxkX1llYXJNb250
aF9DaXR5XzMANQMDDwUFAwMEBAQEEgUFBQ8FBQQEBAQFBQQEBAQDAw8SAw8SAwMDDwMPDw8DBQQE
AwUEBBIDLzwACAgEBAQEAAgICAkACAgEBAQECAgEBAQElgAAlgAALAEsAR4AHgAIBAQIBAQA/H//
7///D5OtCLU=
uSGAVB5YAAAAfAAAAMKPshcAAEZaDwMAAAEAAgA1f4jDEAAAEACA3gcAAAsAAAACYnQ79Ju92Vq2
QOvVqzkViTBAYQIAALYBAACZlIkOGQBeIJOylwhYQDhw4CigVVVArMdF6gnpS0BxjcUFmpaVQAEA
AAACAAAASB1Cug==
'/*!*/;
### INSERT INTO `cityre_baotou`.`Yield_YearMonth_City_3`
### SET
###   @1=2014
###   @2=11
###   @3='bt'
###   @4=5722.8505494567170899
###   @5=16.535480122043662021
###   @6=609
###   @7=438
###   @12='2014-12-04 16:56:25'
###   @16=''
###   @17=96.134258884122999689
###   @18=85.337900370767670211
###   @23=55.820615085670709732
###   @24=1381.6504126422480567
###   @29=1
###   @53=2

this is the data i dumped from the bin log.

17b28f46 b9 21 80 54 1e 58 00 00 00 7c 00 00 00 c2 8f b2 |.!.T.X...|......|
17b28f56 17 00 00 46 5a 0f 03 00 00 01 00 02 00 35 7f 88 |...FZ........5..|
17b28f66 c3 10 00 00 10 00 80 de 07 00 00 0b 00 00 00 02 |................|
17b28f76 62 74 3b f4 9b bd d9 5a b6 40 eb d5 ab 39 15 89 |bt;....Z.@...9..|
17b28f86 30 40 61 02 00 00 b6 01 00 00 99 94 89 0e 19 00 |0@a.............|
17b28f96 5e 20 93 b2 97 08 58 40 38 70 e0 28 a0 55 55 40 |^ ....X@8p.(.UU@|
17b28fa6 ac c7 45 ea 09 e9 4b 40 71 8d c5 05 9a 96 95 40 |..E...K@q......@|
17b28fb6 01 00 00 00 02 00 00 00 48 1d 42 ba b9 21 80 54 |........H.B..!.T|
17b28fc6 10 58 00 00 00 1f 00 00 00 e1 8f b2 17 00 00 8c |.X..............|
17b28fd6 e2 63 b3 00 00 00 00 23 70 d7 7f b9 21 80 54 02 |.c.....#p...!.T.|
17b28fe6 58 00 00 00 59 00 00 00 3a 90 b2 17 08 00 e5 43 |X...Y...:......C|
17b28ff6 fd 05 00 00 00 00 0d 00 00 22 00 00 00 00 00 00 |........."......|
17b29006 01 00 00 20 40 00 00 00 00 06 03 73 74 64 04 21 |... @......std.!|
17b29016 00 21 00 21 00 05 06 53 59 53 54 45 4d 63 69 74 |.!.!...SYSTEMcit|

there is 53 fields in my table.the connector should read de 07 00 00 0b 00 00 00 as the data for Field 1 and Field 2,'2014' and '11'.But it read 00 80 de 07 00 00 0b as nullColumns BitSet. So there is not enough bytes for Field Data.It raise EOFException.

Is there somthing wrong with the log event format?

I use this connector in my production environment, Please Help.

shyiko added a commit that referenced this issue Dec 5, 2014
@shyiko
Copy link
Owner

shyiko commented Dec 5, 2014

Thank you. I was able to reproduce the problem with binlog_row_image set to 'minimal' (default - 'full'). Now it should work regardless of the value (fix included in 0.1.1-SNAPSHOT).

@shyiko
Copy link
Owner

shyiko commented Dec 8, 2014

Available in 0.1.1.

@shyiko shyiko closed this as completed Dec 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants