-
Notifications
You must be signed in to change notification settings - Fork 188
*: support recover relay log file with a subset of metadata #530
Conversation
/run-all-tests tidb=release-3.0 |
@WangXiangUSTC @lichunzhu PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to add kill -9 dm-worker in integration test?
rest LGTM
@@ -50,7 +50,7 @@ func GenCommonFileHeader(flavor string, serverID uint32, gSet gtid.Set) ([]*repl | |||
Flags: defaultHeaderFlags, | |||
} | |||
latestPos = uint32(len(replication.BinLogFileHeader)) | |||
prevGTIDsEv *replication.BinlogEvent // for MySQL, this will be a GenericEvent | |||
prevGTIDsEv *replication.BinlogEvent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the new go-mysql change the rule?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, new go-mysql adds a new PreviousGTIDsEvent
struct to replace GenericEvent with EventType=PREVIOUS_GTIDS_EVENT
.
@WangXiangUSTC like a special type of chaos test? In fact, this is a litter hard to simulate it by simply kill the process (when just writing the data). |
ok , we can ignore it now |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
pkg/terror/error_list.go
Outdated
@@ -642,7 +642,7 @@ var ( | |||
ErrBinlogWriterWriteDataLen = New(codeBinlogWriterWriteDataLen, ClassFunctional, ScopeInternal, LevelHigh, "data length %d") | |||
ErrBinlogWriterFileNotOpened = New(codeBinlogWriterFileNotOpened, ClassFunctional, ScopeInternal, LevelHigh, "file %s not opened") | |||
ErrBinlogWriterFileSync = New(codeBinlogWriterFileSync, ClassFunctional, ScopeInternal, LevelHigh, "sync file") | |||
ErrBinlogPrevGTIDEvNotValid = New(codeBinlogPrevGTIDEvNotValid, ClassFunctional, ScopeInternal, LevelHigh, "PreviousGTIDsEvent should be a GenericEvent in go-mysql, but got %T") | |||
ErrBinlogPrevGTIDEvNotValid = New(codeBinlogPrevGTIDEvNotValid, ClassFunctional, ScopeInternal, LevelHigh, "PreviousGTIDsEvent should be a PreviousGTIDsEvent in go-mysql, but got %T") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't understand this error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in 08679dd.
/run-all-tests tidb=release-3.0 |
Codecov Report
@@ Coverage Diff @@
## master #530 +/- ##
==========================================
Coverage ? 56.831%
==========================================
Files ? 183
Lines ? 18921
Branches ? 0
==========================================
Hits ? 10753
Misses ? 7080
Partials ? 1088 |
cherry pick to release-1.0 in PR #531 |
) (cherry picked from commit 291439b)
What problem does this PR solve?
fix #443 , this should be release under v1.0.4.
What is changed and how it works?
support recover relay log file with a subset of metadata
also update
go-mysql
to fixGTIDSet.Equal
.Check List
Tests
Code changes
Side effects
Related changes