julien-duponchelle / julien-duponchelle/python-mysql-replication

why the TableMapEvent pased by _ctl_connection

Open
#238 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.4k
Forks
690
PR merge metrics
No merged PRs in 30d

Description

why the TableMapEvent pased by _ctl_connection from master?Not parse from binlog?Beacuse when we has more than 10 thousand records import into mysql .It 's very slow.
The code is in pymysqlreplication.row_event.TableMapEvent class at line 579~582;
` if self.table_id in table_map:
self.column_schemas = table_map[self.table_id].column_schemas
else:
self.column_schemas = self._ctl_connection._get_table_information(self.schema, self.table)
`
the self.table_id property is always {}.

Contributor guide

Open the contributing guide

Research direction

Start in pymysqlreplication.row_event.TableMapEvent around lines 579–582 and trace how table_map and table_id are populated before this branch. Compare that path with binlog TableMapEvent handling during a large import; the issue is done when the empty table_id behavior and resulting slow metadata lookups are explained and addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, python
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.