Skip to content

Support for skipping the binlog until reaching specified timestamp. #114

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

Merged
merged 1 commit into from
Jun 3, 2015

Conversation

vartec
Copy link

@vartec vartec commented May 29, 2015

The rationale behind this is that as server fails over, the binlog position you've got stored from failed server might no longer be valid on the new one. With MySQL 5.6 you're fine, because you got GTIDs, but if you're using older MySQL there is no way of telling from which log position you should start. Timestamp helps to roughly know where to start. If your app is capable of dealing with duplicates, that is good enough.

@julien-duponchelle
Copy link
Owner

Thanks! I'm away from home I will take a look on that when coming back at
the beginning of next week.

Le ven. 29 mai 2015 03:48, Bartek Ogryczak [email protected] a
écrit :

The rationale behind this is that as server fails over, the binlog
position you've got stored from failed server might no longer be valid on
the new one. With MySQL 5.6 you're fine, because you got GTIDs, but if
you're using older MySQL there is no way of telling from which log position
you should start. Timestamp helps to roughly know where to start. If

your app is capable of dealing with duplicates, that is good enough.

You can view, comment on, or merge this pull request online at:

#114
Commit Summary

  • Adding support for skipping the binlog until reaching specified
    timestamp.

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#114.

@bjoernhaeuser
Copy link
Collaborator

Why not implement that just in the application itself?

@julien-duponchelle
Copy link
Owner

I think it's usefull if you changed the schema and want to skip the events.

@vartec
Copy link
Author

vartec commented May 29, 2015

@bjoernhaeuser the reason for doing here and not at application level is to avoid inflating rows into Python objects, which is CPU consuming and seriously limits the throughput.

MySQL's binlog reader has similar option: https://dev.mysql.com/doc/refman/5.6/en/mysqlbinlog.html#option_mysqlbinlog_start-datetime

@vartec
Copy link
Author

vartec commented May 29, 2015

sorry about this back and forth with tests, but the outcome seems to depend heavily on MySQL version and configuration :-/

@vartec
Copy link
Author

vartec commented May 29, 2015

FYI, I've squashed the unittest commit mess.

julien-duponchelle added a commit that referenced this pull request Jun 3, 2015
Support for skipping the binlog until reaching specified timestamp.
@julien-duponchelle julien-duponchelle merged commit 647ccee into julien-duponchelle:master Jun 3, 2015
@julien-duponchelle
Copy link
Owner

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants