-
Notifications
You must be signed in to change notification settings - Fork 819
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
BinaryLogClient race condition on reconnect causing duplicate events to be processed #113
Comments
@andrewbudimanasana Thank you so much! Fix is going to be released in 0.4.2 (as soon as I'm done testing changes). |
0.4.2 is out (Maven Central sync might take up to 2 hours). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Timeline:
Currently, the 2 ways thread A was supposed to notice the reconnect and
stop:
From what I can tell, thread A was supposed to stop because the state
became disconnected, and then exit because the next read should
have yielded EOF.
This doesn't always work because:
B updates the global connect state
The symptom of this is interleaving duplicate events. This especially
messes up the transaction logic.
I'm using mypipe which uses version 0.2.4 so I created a patch on top of that branch here. https://github.com/andrewbudiman/mysql-binlog-connector-java/commits/fix-reconnect-processing
I'd be happy to create a pr for the master branch. I was considering a more intrusive refactor to make things cleaner, but didn't know if you already had ideas so I tried to keep the patch simple.
The text was updated successfully, but these errors were encountered: