Repository navigation
Description
Summary
In a private MatrixOne deployment, multiple CDC tasks appear running in mo_cdc task show, but their checkpoints are stale or failed. The CDC watermark updater continuously fails with context deadline exceeded, and drop cdc task / drop cdc all fail with invalid connection, leaving old paused tasks in CDC metadata and watermark updates.
This looks like a CDC control-plane / metadata / watermark consistency problem rather than a simple client network issue:
- Normal MySQL queries against the same cluster return successfully in sub-second time.
mo_cdc task showstill prints repeated[mysql] ... unexpected EOF.- CN logs continue to report
cdc.watermark.read_error. - Old paused tasks still appear in watermark update SQL.
- Dropping those tasks fails with
invalid connection.
Environment
- MatrixOne version:
8.0.30-MatrixOne-v3.0.0-5e4210029-hotfix-20260603 - Deployment: private deployment, same MatrixOne cluster, cross-account CDC.
- Client:
mo_cdcbinary from localmo-backup; this binary does not expose--versionorversion. - CDC uses table-level PITR. Existing PITR:
ods_s4.t_s4_performance: 24hods_s4.performance_file_attach: 24hods_ecc.performance_file_attach: 24h
Tasks Involved
1. FIN -> BID, ods_s4.t_s4_performance
Original task:
- Task name:
private_fin_ods_s4_to_bid_t_s4_performance_cdc - Task ID:
019ed526-3bca-7555-b23c-f95801fa85e3 - Current state:
paused - Current checkpoint shown by
mo_cdc task show:
ods_s4.t_s4_performance: 2026-06-29 17:42:16.080563741 +0000 UTC
Rebuild full task:
- Task name:
private_fin_ods_s4_to_bid_t_s4_performance_cdc_full_20260701 - Task ID:
019f1bb8-537d-79a6-ad6b-0880137f36f5 - Current state:
paused - Checkpoint stayed at:
ods_s4.t_s4_performance: 1970-01-01 00:00:00 +0000 UTC
Current incremental no-full task:
- Task name:
private_fin_ods_s4_to_bid_t_s4_performance_cdc_incr_20260701 - Task ID:
019f1bbd-5add-705b-b7f7-044e90e50023 - Current state:
running - Checkpoint shown by
mo_cdc task show:
ods_s4.t_s4_performance: 2026-07-01 03:33:48.007446058 +0000 UTC
Current data count is correct:
source fin.ods_s4.t_s4_performance rows: 162442
target bid.ods_s4.t_s4_performance rows: 162442
target distinct (VBELN, POSNR): 162442
target duplicate groups by (VBELN, POSNR): 0
However, the watermark updater still reports errors for both the old paused task and the new incremental task.
2. BID -> FIN, S4 attachment table
- Task name:
private_bid_to_fin_s4_attach_cdc - Task ID:
019f115c-23d9-78fa-a2cd-429a2c1b35bc - Source:
ods_s4.performance_file_attach - Target:
jst_receipts_tables.performance_file_attach__s4_cdc - Current state:
running - Current checkpoint shown by
mo_cdc task show:
ods_s4.performance_file_attach:
2026-06-29 17:40:32.973762825 +0000 UTC
(Failed, error: N:1782766991:internal error: internal error: no watermark found)
Current data count is not aligned:
source bid.ods_s4.performance_file_attach rows: 54581
target fin.jst_receipts_tables.performance_file_attach__s4_cdc rows: 54526
diff: 55 rows missing on target
3. BID -> FIN, ECC attachment table
- Task name:
private_bid_to_fin_ecc_attach_cdc - Task ID:
019f115c-2b93-7d68-81a4-fe6c77f9425a - Source:
ods_ecc.performance_file_attach - Target:
jst_receipts_tables.performance_file_attach_ecc_cdc - Current state:
running - Current checkpoint shown by
mo_cdc task show:
ods_ecc.performance_file_attach: 2026-06-29 17:40:33.561126733 +0000 UTC
Current data count is aligned:
source bid.ods_ecc.performance_file_attach rows: 22451
target fin.jst_receipts_tables.performance_file_attach_ecc_cdc rows: 22451
But the checkpoint is stale and CN logs show repeated watermark update failures for this task.
Operation Log
2026-07-01: checked current CDC state
Command pattern:
mo_cdc task show --source-uri "<redacted-fin-source-uri>" --all
mo_cdc task show --source-uri "<redacted-bid-source-uri>" --allBoth commands returned JSON, but also printed repeated client errors:
[mysql] 2026/07/01 13:31:43 connection.go:49: unexpected EOF
[mysql] 2026/07/01 13:31:44 connection.go:49: unexpected EOF
2026-07-01: verified normal MySQL queries work
The following checks succeeded quickly against the same cluster:
SELECT NOW(), CONNECTION_ID(), COUNT(*) FROM ods_s4.t_s4_performance;
SELECT NOW(), CONNECTION_ID(), COUNT(*) FROM ods_s4.performance_file_attach;Results:
FIN t_s4 rows: 162442
BID S4 attachment rows: 54581
So the issue is not simply that the client cannot connect to MatrixOne.
2026-07-01: tried to clean old CDC tasks
The following operations failed:
mo_cdc task drop --source-uri "<redacted-fin-source-uri>" \
--task-name "private_fin_ods_s4_to_bid_t_s4_performance_cdc"
mo_cdc task drop --source-uri "<redacted-fin-source-uri>" \
--task-name "private_fin_ods_s4_to_bid_t_s4_performance_cdc_full_20260701"
drop cdc allCN logs:
2026/07/01 03:27:22 UTC
caller=frontend/cdc_handle.go:339
msg=cdc.on_pre_update.delete_task.failed
task-name=private_fin_ods_s4_to_bid_t_s4_performance_cdc
error=invalid connection
2026/07/01 03:27:22 UTC
caller=frontend/cdc_handle.go:267
msg=cdc.do_update_task.failed
task-name=private_fin_ods_s4_to_bid_t_s4_performance_cdc
target-status=CancelRequested
affected-count=0
error=invalid connection
2026/07/01 03:27:22 UTC
statement="drop cdc task private_fin_ods_s4_to_bid_t_s4_performance_cdc"
status=fail
error=invalid connection
For the full rebuild task:
2026/07/01 03:33:39 UTC
caller=frontend/cdc_handle.go:355
msg=cdc.on_pre_update.delete_watermark.failed
task-name=private_fin_ods_s4_to_bid_t_s4_performance_cdc_full_20260701
key-count=1
error=invalid connection
2026/07/01 03:33:39 UTC
caller=frontend/cdc_handle.go:267
msg=cdc.do_update_task.failed
task-name=private_fin_ods_s4_to_bid_t_s4_performance_cdc_full_20260701
target-status=CancelRequested
affected-count=0
error=invalid connection
For drop cdc all:
2026/07/01 03:27:45 UTC
statement="drop cdc all"
status=fail
error=invalid connection
2026-07-01: watermark updater still failing after recheck
Recent CN logs from 2026-07-01 05:28-05:32 UTC:
caller=cdc/watermark_updater.go:427
msg=cdc.watermark.read_error
error="context deadline exceeded\ninternal error: watermark update"
err-msg="commit sql \"INSERT INTO `mo_catalog`.`mo_cdc_watermark`
(account_id, task_id, db_name, table_name, watermark)
VALUES
(10001, '019f1bbd-5add-705b-b7f7-044e90e50023', 'ods_s4', 't_s4_performance', ...),
(20002, '019f115c-2b93-7d68-81a4-fe6c77f9425a', 'ods_ecc', 'performance_file_attach', ...),
(10001, '019ed526-3bca-7555-b23c-f95801fa85e3', 'ods_s4', 't_s4_performance', ...)
ON DUPLICATE KEY UPDATE watermark = VALUES(watermark)\" failed"
The old paused task 019ed526-3bca-7555-b23c-f95801fa85e3 is still included in watermark update SQL together with the new incremental task 019f1bbd-5add-705b-b7f7-044e90e50023.
Other repeated logs:
caller=cdc/watermark_updater.go:427
msg=cdc.watermark.read_error
error="context deadline exceeded\ninternal error: watermark update err msg"
err-msg="update err_msg sql \"INSERT INTO `mo_catalog`.`mo_cdc_watermark`
(account_id, task_id, db_name, table_name, err_msg)
VALUES
(10001, '019ed526-3bca-7555-b23c-f95801fa85e3', 'ods_s4', 't_s4_performance', ''),
(10001, '019f1bbd-5add-705b-b7f7-044e90e50023', 'ods_s4', 't_s4_performance', '')
ON DUPLICATE KEY UPDATE err_msg = VALUES(err_msg)\" failed"
And for the ECC attachment task:
caller=cdc/watermark_updater.go:427
msg=cdc.watermark.read_error
error="context deadline exceeded\ninternal error: watermark update err msg"
err-msg="update err_msg sql \"INSERT INTO `mo_catalog`.`mo_cdc_watermark`
(account_id, task_id, db_name, table_name, err_msg)
VALUES
(20002, '019f115c-2b93-7d68-81a4-fe6c77f9425a', 'ods_ecc', 'performance_file_attach', '')
ON DUPLICATE KEY UPDATE err_msg = VALUES(err_msg)\" failed"
Expected Behavior
drop cdc taskshould reliably remove task metadata and watermark metadata, or return an actionable error without leaving the task in a half-deleted state.- Paused or cancelled tasks should not continue to participate in active watermark updater batches.
- A failure in one task's watermark update should not block watermark progress for unrelated running tasks.
mo_cdc task showshould not reportrunningwithout surfacing stale checkpoint / failed watermark health clearly.- A running task should not remain indefinitely at a failed checkpoint such as
no watermark found.
Actual Behavior
drop cdc taskanddrop cdc allfail withinvalid connection.- Old paused tasks still appear in watermark update SQL.
- Watermark updater repeatedly fails with
context deadline exceeded. mo_cdc task showreports tasks asrunning, while checkpoints are stale or failed.- One S4 attachment CDC task is already data-inconsistent: target is missing 55 rows.
Questions / Help Needed
- What is the supported way to safely clean up CDC metadata / watermark rows / runner state when
drop cdc taskfails withinvalid connection? - Why can paused tasks remain in watermark update SQL?
- Should the watermark updater batch multiple tasks together in one SQL statement? If yes, how is task-level isolation guaranteed when one task/connection times out?
- Why does
mo_cdc task showkeep returningrunningwhen checkpoint is stale or hasno watermark found? - Is the repeated
unexpected EOFfrommo_cdc task showexpected/retryable, or does it indicate a CDC client/server protocol problem?
Impact
This blocks reliable private-deployment CDC usage. We can manually repair table data by full rebuild, but the CDC control plane remains unhealthy:
- stale paused tasks cannot be deleted;
- watermark updates keep timing out;
- at least one running CDC task has already diverged by 55 rows;
- users cannot tell from
state=runningwhether CDC is actually healthy.
Activity
jiangxinmeng1 commentedon Jul 3, 2026
lock service上死锁了
fix(lockservice): break owner-local remote lock deadlocks (#25447)
fix(lockservice): backport owner-local remote lock deadlock fix to 3.…
fix(lockservice): release forwarded txn before async wait (#25469)
fix(lockservice): backport owner-local remote lock deadlock fix to 4.…
fix(lockservice): break owner-local remote lock deadlocks (matrixorig…
fix(lockservice): break owner-local remote lock deadlocks (matrixorig…
fix(lockservice): break owner-local remote lock deadlocks (matrixorig…