zkfan / tungsten-replicator

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

Enable THL to regenerate itself after an error #147

Closed GoogleCodeExporter closed 9 years ago

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

Tungsten replicator but especially to the thl utility. 

2. Describe the feature in general

It is not currently possible to regenerate the THL from a particular start 
point in the MySQL relay log or binlog. The restart point requires not only the 
binlog file and offset, but also a starting global transaction ID.  This means 
that Tungsten Replicator can end up unable to continue if one of its log files 
is corrupted.  

Tungsten will be upgraded to support the following operations. 

a. Regenerate the THL manually by specifying a starting global ID and 
file/offset (event ID) in either the binlog or relay log.  This allows an 
operator to delete the THL fully, then start the THL reading at a particular 
point with a given sequence number.  

b. Regenerate the log from the lowest global ID and binlog file/offset applied 
to the database.  This allows an operator to delete THL logs fully to get 
around log problems.  The THL will then regenerate itself using the minimum 
global ID and event ID propagated backwards from the appliers.  

3. Describe the feature interface

The thl utility will be extended to add additional command options to support 
THL recreation. 

4. Give an idea (if applicable) of a possible implementation

TBD, but will probably require a modest extension to the disk log classes as 
well as 'thl'.  

5. Describe pros and cons of this feature.

5a. Why the world will be a better place with this feature.

It will enable fast repair of corrupt logs.  

5b. What hardship will the human race have to endure if this feature is
implemented.

None, other than development effort. 

6. Notes

Original issue reported on code.google.com by berkeley...@gmail.com on 3 Jul 2011 at 10:51

GoogleCodeExporter commented 9 years ago

Original comment by berkeley...@gmail.com on 3 Jul 2011 at 10:51

GoogleCodeExporter commented 9 years ago

Original comment by berkeley...@gmail.com on 8 Sep 2011 at 5:17

GoogleCodeExporter commented 9 years ago

Original comment by berkeley...@gmail.com on 8 Sep 2011 at 5:18

GoogleCodeExporter commented 9 years ago
This is implemented.  The procedure for regenerating logs is described in the 
wiki at the following URL:  
http://code.google.com/p/tungsten-replicator/wiki/TRCAdministration?ts=132237211
6&updated=TRCAdministration#Avoiding_or_Fixing_Corrupt_Transaction_History_Logs.

Original comment by robert.h...@continuent.com on 27 Nov 2011 at 7:48