continuent.org JIRA  History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: TREP-336
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Stephane Giron
Reporter: Stephane Giron
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Tungsten Replicator

MySQLExtractor may fail with an IOException while extracting an event from the binlog, showing a "binlog read error" message in the logs

Created: 18/Aug/09 12:05 PM   Updated: 06/Oct/09 05:38 AM
Component/s: None
Affects Version/s: Tungsten Replicator 1.0.2
Fix Version/s: Tungsten Replicator 1.0.3

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Issue Links:
Related
 
This issue is related to:
TREP-361 MySQLExtractor does not properly hand... Blocker Resolved
TREP-363 Log_event.read_log_event sometimes fa... Critical Resolved

Sub-Tasks  All   Open   
 Sub-Task Progress: 
1. Implement a timeout while waiting for data to be available Sub-task Sub-task Resolved Resolved Stephane Giron  

 Description   
I occasionally get errors from the mysql extractor.

This is some extra logging that shows the problem :
INFO | jvm 1 | 2009/08/18 17:53:18 | 2009-08-18 17:53:18,391 WARN extractor.mysql.Log_event Trying to read more bytes (1037) than available in the file
 (282)
INFO | jvm 1 | 2009/08/18 17:53:18 | com.continuent.tungsten.replicator.extractor.mysql.MySQLExtractException: EOFException while reading 1037 bytes fro
m binlog
INFO | jvm 1 | 2009/08/18 17:53:18 | at com.continuent.tungsten.replicator.extractor.mysql.Log_event.read_log_event(Log_event.java:335)
INFO | jvm 1 | 2009/08/18 17:53:18 | at com.continuent.tungsten.replicator.extractor.mysql.MySQLExtractor.processFile(MySQLExtractor.java:350)
INFO | jvm 1 | 2009/08/18 17:53:18 | at com.continuent.tungsten.replicator.extractor.mysql.MySQLExtractor.extractEvent(MySQLExtractor.java:470)
INFO | jvm 1 | 2009/08/18 17:53:18 | at com.continuent.tungsten.replicator.extractor.mysql.MySQLExtractor.extract(MySQLExtractor.java:758)
INFO | jvm 1 | 2009/08/18 17:53:18 | at com.continuent.tungsten.replicator.thl.THL.getLocalEvents(THL.java:339)
INFO | jvm 1 | 2009/08/18 17:53:18 | at com.continuent.tungsten.replicator.thl.THL.run(THL.java:433)
INFO | jvm 1 | 2009/08/18 17:53:18 | at java.lang.Thread.run(Thread.java:595)
INFO | jvm 1 | 2009/08/18 17:53:18 | Caused by: java.io.EOFException
INFO | jvm 1 | 2009/08/18 17:53:18 | at java.io.DataInputStream.readFully(DataInputStream.java:178)
INFO | jvm 1 | 2009/08/18 17:53:18 | at java.io.DataInputStream.readFully(DataInputStream.java:152)
INFO | jvm 1 | 2009/08/18 17:53:18 | at com.continuent.tungsten.replicator.extractor.mysql.Log_event.read_log_event(Log_event.java:318)
INFO | jvm 1 | 2009/08/18 17:53:18 | ... 6 more

It seems that we try to read data from mysql binlog more quickly than it is really available.

As a consequence, I then got an OOM error as shown by this second log extract :
INFO | jvm 1 | 2009/08/18 17:53:18 | 2009-08-18 17:53:18,402 WARN extractor.mysql.Log_event Event length (with header) is : 1281903144
INFO | jvm 1 | 2009/08/18 17:53:18 | 2009-08-18 17:53:18,402 WARN extractor.mysql.Log_event Event length (without header) is : 1281903125
INFO | jvm 1 | 2009/08/18 17:53:18 | 2009-08-18 17:53:18,532 ERROR replicator.thl.THL THL thread failed
INFO | jvm 1 | 2009/08/18 17:53:18 | java.lang.OutOfMemoryError: Java heap space

It seems that following this first error, we try to extract again from the binlog, and then the size of the event to be read can not be handled

 All   Comments   Work Log   Change History      Sort Order:
Comment by Stephane Giron [04/Sep/09 02:40 PM]
This is fixed in SVN