Skip to content

[FLINK-37275][pipeline-connector/mysql] MySQL source connector supports using the base module's source metric statistics #3914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

beryllw
Copy link
Contributor

@beryllw beryllw commented Feb 10, 2025

close FLINK-37275.
FLINK-36315 supported the flink-cdc-base module source metric statistics, and FLINK-37231 added the metrics documentation. However, the MySQL source currently does not support source metric statistics.

@beryllw
Copy link
Contributor Author

beryllw commented Feb 10, 2025

@beryllw
Copy link
Contributor Author

beryllw commented Feb 11, 2025

@beryllw
Copy link
Contributor Author

beryllw commented Feb 11, 2025

CI. https://github.com/beryllw/flink-cdc/actions/runs/13260216008

@leonardBang Please help me retrigger the CI.

@beryllw
Copy link
Contributor Author

beryllw commented Feb 18, 2025

@ruanhang1993
Copy link
Contributor

@beryllw Thanks for your contribution. This PR has 2 problems.

  1. The metrics in https://github.com/apache/flink-cdc/pull/3619/files relies on the change of states. But mysql cdc connector does not use the framework in flink-cdc-base. So some metrics in SourceReaderMetrics will be wrong.
  2. Is it a good idea that MySQL cdc connector introduce the flink-cdc-base dependency in this PR? Maybe we could introduce these metrics when we complete the task to refactor mysql cdc connetor with flink-cdc-base.

@beryllw
Copy link
Contributor Author

beryllw commented May 13, 2025

  1. Is it a good idea that MySQL cdc connector introduce the flink-cdc-base dependency in this PR? Maybe we could introduce these metrics when we complete the task to refactor mysql cdc connetor with flink-cdc-base.

Agreed, refactoring the mysql cdc connector with flink-cdc-base is the first step.

@yzeng1618
Copy link

Hello, may I ask if there are any plans to develop the adaptation of SourceEnumeratorMetrics indicators in the mysql pipeline?

@beryllw
Copy link
Contributor Author

beryllw commented Jun 17, 2025

Hello, may I ask if there are any plans to develop the adaptation of SourceEnumeratorMetrics indicators in the mysql pipeline?

I'm using PR-related code to support MySQL pipeline connector metrics. For the community, we should first focus on refactoring the MySQL CDC connector using flink-cdc-base, which will enable support for the metrics.
@lvyanquan cc.

@yzeng1618
Copy link

Hello, may I ask if there are any plans to develop the adaptation of SourceEnumeratorMetrics indicators in the mysql pipeline?

I'm using PR-related code to support MySQL pipeline connector metrics. For the community, we should first focus on refactoring the MySQL CDC connector using flink-cdc-base, which will enable support for the metrics. @lvyanquan cc.

Because it is found that the current PR only adapts the metric content of SourceReaderMetrics, and the metrics in SourceEnumeratorMetrics (such as those in the snapshot phase and incremental phase) are still quite important. Do you have any plans for this? If not, I will carry out a simple development on my side.

@beryllw
Copy link
Contributor Author

beryllw commented Jun 18, 2025

Because it is found that the current PR only adapts the metric content of SourceReaderMetrics, and the metrics in SourceEnumeratorMetrics (such as those in the snapshot phase and incremental phase) are still quite important. Do you have any plans for this? If not, I will carry out a simple development on my side.

Is it this file flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/source/assigners/MySqlSnapshotSplitAssigner.java where the changes should be made? Could you explain in more detail what you want to implement? If I haven't implemented it, please go ahead.

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.

3 participants