-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[Mysql]reduce number of BinlogSplitMetaEvent transmission between MySqlSoureReader and MySqlSourceEnumerator #1479
Conversation
…eReader and MySqlSourceEnumerator; fixed log in MySqlSourceEnumerator
@@ -325,7 +325,7 @@ private void fillMetaDataForBinlogSplit(BinlogSplitMetaEvent metadataEvent) { | |||
receivedMetaGroupId, | |||
expectedMetaGroupId); | |||
} | |||
requestBinlogSplitMetaIfNeeded(binlogSplit); | |||
requestBinlogSplitMetaIfNeeded(uncompletedBinlogSplits.get(binlogSplit.splitId())); |
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 don't understand this change, could you explain more ?
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.
after fillMetaDataForBinlogSplit, will create a new binlogSplit in uncompletedBinlogSplits and cover last one , should use new binlogSplit to calculate nextMetaGroupId
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.
if use old binlogSplit,it will cause MySqlSourceReader send repeate BinlogSplitMetaRequestEvent and recevie repeate BinlogSplitMetaEvent
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.
@lidoudou1993 Could you add a test for the PR?
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 recurrence this problem byMySqlSourceExampleTest in debug model. When set splitMetaGroupSize=5,splitSize=50 and two thousand record in table,it will lead receivedMetaGroupId != expectedMetaGroupId when use old binlogSplit calculate nextMetaGroupId,and MySqlSourceReader need send more BinlogSplitMetaRequestEvent to MySqlSourceEnumerator.
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.
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.
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.
@lidoudou1993 you're right, I catch your point
… next meta (apache#1479) Co-authored-by: lidoudou3 <lidoudou1@jd.com>
reduce number of BinlogSplitMetaEvent transmission between MySqlSoureReader and MySqlSourceEnumerator; fixed log MySqlSourceEnumerator