Skip to content

A wrong warning message is logged for every event from ignored table #578

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

Closed
1 of 2 tasks
YAtOff opened this issue Nov 16, 2023 · 3 comments · Fixed by #579
Closed
1 of 2 tasks

A wrong warning message is logged for every event from ignored table #578

YAtOff opened this issue Nov 16, 2023 · 3 comments · Fixed by #579

Comments

@YAtOff
Copy link
Contributor

YAtOff commented Nov 16, 2023

Version

Please specify the versions you are using. Exact version numbers are preferred.

  • Pymyrepl 1.0.3
  • OS Ubuntu 22.04
  • Database and version (Remove unnecessary options):
    • MySQL 8.0.35

System Variables

List relevant system variables using the query SHOW VARIABLES LIKE '<variable_name_here>';

  • log_bin: on
  • binlog_format: row
  • binlog_row_image: full
  • binlog_row_metadata: full
  • enforce_gtid_consistency: on
  • gtid_mode: on

If you are using MySQL 8.0.14 or later, please also provide the following variables:

  • binlog_row_metadata: on
  • binlog_row_value_options: default

Symptoms

The message is A pymysql.OperationalError error occurred, causing a fake rotate event and initialization of the table_map.
But there is no fake rotate event.

Steps to Reproduce

Initialize BinLogStreamReader with only_tables=[#some tables,...] and start iterating it.

Expected Outcome

No warning is logged.

Actual Outcome

Then for each event from a table that is not in the table list, the warning is logged.

My interpretation of the issue

The issue is caused by this PR: #490
If I understand correctly, the table_map should be empty when we have a fake rotate event.
But here, it is not empty. It just doesn't have a key for the table.
It is possible, too, that the table is empty, but that's because no events have been received yet for the tables we are interested in.
I think a flag for the rotation is needed.

Planning to Resolve

  • I plan to create a pull request to resolve this issue.
  • I don't plan to resolve this myself and would like someone else to address it.
@sean-k1
Copy link
Collaborator

sean-k1 commented Nov 16, 2023

@YAtOff
Hello. Thanks for reporting.
Yes I think we should consider when filter table cases.

We need capture fake rotate Event.

@sean-k1 sean-k1 mentioned this issue Nov 23, 2023
9 tasks
@dongwook-chan
Copy link
Collaborator

@YAtOff
Thank you for reporting the issue.
Could you please provide the list of arguments that you passed to BinLogStreamReader?

@YAtOff
Copy link
Contributor Author

YAtOff commented Nov 24, 2023

@YAtOff Thank you for reporting the issue. Could you please provide the list of arguments that you passed to BinLogStreamReader?

I'll give you the exact code. The exact values are not necessary.

    stream = BinLogStreamReader(
          connection_settings=MYSQL_SETTINGS,
          server_id=cdc_settings['MYSQL_SERVER_ID'],
          blocking=True,
          only_schemas=[schema],
          only_tables=[file_table, fileversion_table],
          only_events=[WriteRowsEvent, UpdateRowsEvent, GtidEvent],
          resume_stream=True,
          log_file=log_pos.file,
          log_pos=log_pos.position
    )

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 a pull request may close this issue.

3 participants