julien-duponchelle / julien-duponchelle/python-mysql-replication
why the TableMapEvent pased by _ctl_connection
- 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
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