Skip to content

fake rotate event check #579

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
Nov 25, 2023
Merged

fake rotate event check #579

merged 1 commit into from
Nov 25, 2023

Conversation

sean-k1
Copy link
Collaborator

@sean-k1 sean-k1 commented Nov 23, 2023

Description

resolve #578

We initialize the table_map when we create the binlogstreamreader object.

After that, if the binlog is maxsize full, a rotateEvent is fired.
At that point, we empty the table_map because the timestamp is not zero.
Then, when we connect to the next binlogfile, we get a rotateEvent with a timestamp of 0. We don't need to empty the table_map again.

However, when we disconnect from mysql and reconnect, we get a fake rotateEvent with a 0 timestamp.
In this case, we inform the client of error logging and do not initialize the table map.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Other (please specify below)

Checklist

  • I have read and understood the CONTRIBUTING.md document.
  • I have checked there aren't any other open Pull Requests for the desired changes.
  • This PR resolves an issue #[Issue Number Here].

Tests

  • All tests have passed.
  • New tests have been added to cover the changes. (describe below if applicable).

Additional Information

@sean-k1 sean-k1 force-pushed the fake-rotate-event-check branch 3 times, most recently from 7cee733 to 143ebe6 Compare November 23, 2023 01:46
@sean-k1 sean-k1 marked this pull request as draft November 23, 2023 01:47
@sean-k1 sean-k1 force-pushed the fake-rotate-event-check branch from 143ebe6 to 0432899 Compare November 23, 2023 01:58
not initailizing  table map when fake rotate Event

add black lint
@sean-k1 sean-k1 force-pushed the fake-rotate-event-check branch from 0432899 to 1d5dfcf Compare November 23, 2023 01:59
@sean-k1 sean-k1 marked this pull request as ready for review November 23, 2023 02:05
Copy link
Collaborator

@dongwook-chan dongwook-chan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sean-k1 sean-k1 merged commit 6850c0d into main Nov 25, 2023
@Zaynullin
Copy link

Zaynullin commented Oct 3, 2024

Hi there! Can you please repeat the changes for the version v0.45.+? I use mysql version 5.7 and caught the same problem. I found that your PR already resolved this problem, but for version 1.0.+.

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.

A wrong warning message is logged for every event from ignored table
3 participants