Skip to content

concurrent mysql read - #60218

Merged
Rodi Reich Zilberman (rodireich) merged 21 commits into
masterfrom
12727-concurrent-mysql-implement-split-for-mysql-partitions-with-numeric-key
May 29, 2025
Merged

Rodi Reich Zilberman (rodireich) merged 21 commits into
masterfrom
12727-concurrent-mysql-implement-split-for-mysql-partitions-with-numeric-key

Conversation

@rodireich

@rodireich Rodi Reich Zilberman (rodireich) commented May 12, 2025 •

Copy link
Copy Markdown
Contributor

What

In preparation for the speed increase, mysql has to be to be able to read a table using concurrent partitions.
This change turns mysql to concurrent.

How

Because the mysql server doesn't have the necessary SELECT … FROM TABLE SAMPLE, we need to build partitions boundaries using a different algorithm.
This change applies math in order implement boundaries.

It also plugs into the existing framework of partitions factory and implements the necessary Splittable partitions variants for all relevant sync types (full-refresh, CDC, cursor) and phases (snapshot, incremental)

If you have a table with a highest primary key 500 and the table is partitioned into 5 partitions the boundaries will be set as
0…10
10…20
20…30
30…40
40…50

Review guide

  1. MySqlSourceJdbcPartition.kt: DI overload of partitions creator. routing code to mysql' own implementation.
  2. MySqlSourceJdbcPartitionFactory: the new implementation of split()

User Impact

The intention is to merge this code initially turned off by leaving application.yml with mode: sequential.
While we keep testing an validate with boosted mode additions.

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

@vercel

vercel Bot commented May 12, 2025 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 29, 2025 7:35pm

@github-actions

github-actions Bot commented May 12, 2025 •

Copy link
Copy Markdown
Contributor

source-mysql Connector Test Results

  8 files    8 suites   28s ⏱️
 46 tests  46 ✅ 0 💤 0 ❌
170 runs  170 ✅ 0 💤 0 ❌

Results for commit 6f1735e.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented May 29, 2025 •

Copy link
Copy Markdown
Contributor

Note

Detected that there are differences in the Gradle dependencies.

@rodireich
Rodi Reich Zilberman (rodireich) deleted the 12727-concurrent-mysql-implement-split-for-mysql-partitions-with-numeric-key branch May 29, 2025 20:38

@mwbayley Matt Bayley (mwbayley) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was mid-review when I noticed this got merged. Better late than never?

* Interface to allow each toolkit to return the active [PartitionsCreatorFactory] class For
* [ReadOperation] to be able to iterator on active factories only.
*/
interface PartitionsCreatorFactorySupplier<T : PartitionsCreatorFactory> : Supplier<T>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this interface? Can we just use Supplier<T: PartitionsCreatorFactory> directly?


/**
* Interface to allow each toolkit to return the active [PartitionsCreatorFactory] class For
* [ReadOperation] to be able to iterator on active factories only.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sp: iterate

core = 'extract'
toolkits = ['extract-jdbc', 'extract-cdc']
cdk = '0.409'
cdk = 'local'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're trying to avoid doing this these days, right?

This branch was successfully deployed

1 active deployment
Preview — 6f1735e8 Deployed May 29, 2025 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants