hadoopkandy commented on PR #4509:
URL: https://github.com/apache/flink-cdc/pull/4509#issuecomment-5364664783
> And Could we make this metric opt-in through a source configuration
instead of enabling it by default?
>
> This is not a purely local metric. It executes `SHOW MASTER STATUS`
against the MySQL server every 10 seconds. Enabling it by default means that
all existing CDC jobs will start issuing additional queries after upgrading,
even when users do not need this metric. When many CDC jobs connect to the same
MySQL instance, these recurring queries may accumulate and introduce unexpected
server-side overhead.
>
> I suggest disabling this feature by default and providing a configuration
option to enable it explicitly. When disabled, the connector should skip both
metric registration and the periodic master-status query.
Great feedback. Addressed both concerns:
1. Opt-in via configuration: Added scan.binlog.position-lag.interval.ms
(default -1, meaning disabled). A positive value enables the feature and
controls the polling interval. When disabled, both the periodic SHOW MASTER
STATUS query and metric registration are skipped entirely.
2. Metric semantics split: Replaced the single currentBinlogPositionLag
with two independent metrics:
- currentBinlogTransactionLag: GTID-based transaction count lag
(available only in GTID mode)
- currentBinlogBytePositionLag: byte-level lag based on binlog file +
position (always available when enabled)
This avoids the ambiguity of mixing different units in one metric and
gives users clear, actionable signals.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]