apache / apache/paimon

[Bug] flink database sync action can not deal `excludedTables` when too many tables

Open
#1,772 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
3.4k
Forks
1.4k
Avg merge
1d 11h
Merged PRs (30d)
396

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/incubator-paimon/issues) and found nothing similar.

### Paimon version

master

### Compute Engine

flink

### Minimal reproduce step

1. start a flink database sync action.
2. If the database has over 1000 tables ,but the user only wants to synchronize one table , `excludedTables` will include all other tables
3. `excludingPattern` [will become too long to exceed the max length of the Java variable](https://github.com/apache/incubator-paimon/blob/15db061c168abf310e8536b317b9a25395df761e/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/cdc/mysql/MySqlSyncDatabaseAction.java#L422)

### What doesn't meet your expectations?

![image](https://github.com/apache/incubator-paimon/assets/25563794/848156a3-2476-4f55-941d-bfdcc2f7149b)

### Anything else?

_No response_

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/cdc/mysql/MySqlSyncDatabaseAction.java, especially the code around line 422 that builds excludingPattern. Reproduce the database sync with more than 1000 tables while selecting one table, then verify the action handles the resulting pattern without exceeding Java's length limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, mysql
Domain
data-engineering, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.