-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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] Add a module to periodically check ip on DNS (for DB Switching) #2457
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This closes apache#2237.
Co-authored-by: gongzhongqiang <[email protected]>
* [docs] add docs for the mysql tables without primary keys
…ssing (apache#2310) Co-authored-by: gongzhongqiang <[email protected]>
… restoring from the checkpoint (apache#2292) (apache#2318)
…the supported features of each connector This closes apache#1736. Co-authored-by: rookiegao <rookiegao712@gmail>
Co-authored-by: chenlei677 <[email protected]>
) * [hotfix] Fix sqlserver monitor same table in other database * Add unit test --------- Co-authored-by: gongzhongqiang <[email protected]>
…e with MySqlSourceReader.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First, we'd like to thank everyone who contributes to Flink CDC.
Our team uses Flink CDC to perform MySql CDC.
In the real-world DB use case, DBs are organized in a master-slave structure and DB switching occurs periodically.
When DB Switching occurs, the connected slave server is promoted to the master server.
The problem is that flink CDC connector keeps the connection, but in the real-world use case, there is a policy that it should not be attached to the master server of DB.
For resolve this issue, our team implemented DnsIpChecker modules. (We saw similar issue and answer)
Here's how it works
MySqlSourceReader(subtaskId=0)
creation. (to share lifecycle ofMySqlSourceReader
)FlinkRuntimeException
by sending aSourceEvent
toMySqlSourceEnumerator
to restart the Flink Job to reset the DB connection.MySqlSourceReader
, so that the thread is also terminated when the Flink CDC Job is terminated,This is portion of our code (We assumed that we only capture 1 table per flink cdc job)
We considered just resetting the DB connection only,
but it was difficult to get a recovery point, so we chose to restart the Flink Job for using Flink's checkpoints.
Like the log below, we also take periodic logs to check if the IP scan is performing normally.
(Hostname and ip masked)
If you are interested in this feature, please feel free to check it out. Any comments or feedback would also be appreciated.
Have a great day all Flink users 😄