debezium / debezium/dbz

Debezium locking database durin bootstrap [DBZ-1240]

Open
#218 0 comments 0 reactions 0 assignees View on GitHub
component/mysql-connector migrated-from-jira type/bug
Dominant language
HTML
Stars
6
Forks
9
Avg merge
2d 19h
Merged PRs (30d)
1

Description

Migrated from [DBZ-1240](https://issues.redhat.com/browse/DBZ-1240)

We have a issue while running DBZ in distributed KC framework.

Here is the scenario. if have 3 KC servers running in a distributed mode.

KC1
KC2
KC3

Now we submit a config for bootstrapping. and while bootstrap is still not complete. if i try to add another server say KC4 to existing cluster this will create a lock on the DB it does looks like all the connectors try to get lock.

Lock will not be released untill i kill all KC process on all the servers. This causes drastic issues on database (mysql) as well.

Here is the database process list during that time.

{code}
| Id | User | Host | db | Command | Time | State | Info | Rows_sent | Rows_examined |
| 7603394 | debezium | 10.40.0.147:49502 | wepay | Query | 337 | Sending data | SELECT * FROM `***`.`**** ` | 166504738 | 0 |
| 7603674 | debezium | 10.40.255.52:54592 | NULL | Query | 186 | Waiting for table flush | FLUSH TABLES WITH READ LOCK | 0 | 0 |
| 7603804 | debezium | 10.40.1.46:46880 | NULL | Query | 118 | Waiting for table flush | FLUSH TABLES WITH READ LOCK | 0 | 0 |
| 7603805 | debezium | 10.40.1.46:46878 | NULL | Sleep | 118 | | NULL | 1 | 0 |
| 7603814 | debezium | 10.40.1.46:46934 | NULL | Binlog Dump GTID | 118 | Master has sent all binlog to slave; waiting for more updates | NULL
{code}

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the three-server KC bootstrap scenario, then add KC4 while bootstrap is still running and inspect the MySQL process list. Done means adding a server no longer leaves database locks or long-running FLUSH TABLES WITH READ LOCK queries that require killing all KC processes.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.