pingcap / pingcap/ticdc

[P1][Logs] Remove duplicate logs on the same error path

Open
#4,736 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/enhancement
Dominant language
Go
Stars
56
Forks
63
Avg merge
2d 20h
Merged PRs (30d)
34

Description

Parent issue: #4691

Intent

Some failures are logged multiple times along the same error path with nearly identical messages. That increases volume without adding diagnostic value. This task keeps only the logs that explain the root cause and the cross-module boundary where the error is returned.

Modification points

  • Identify failure paths that currently emit duplicate failed, error, or exit with error messages in the same layer.
  • Keep a single source log for the root cause and, when needed, a single boundary log for module context.
  • Remove duplicate logs that only restate the same failure without adding new information.

Entry points

  • downstreamadapter/dispatcherorchestrator/dispatcher_orchestrator.go:185
  • downstreamadapter/dispatcherorchestrator/dispatcher_orchestrator.go:199
  • server/module_election.go:145
  • server/module_election.go:174

Done criteria

  • A single failure emits at most one source log and one boundary log.
  • The remaining logs have distinct responsibilities instead of repeating the same error text.
  • The same-layer duplicate error pattern is removed from the identified paths.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the failure paths at downstreamadapter/dispatcherorchestrator/dispatcher_orchestrator.go:185 and :199, then server/module_election.go:145 and :174. Trace each error path to distinguish the root-cause log from the cross-module boundary log. Done means each failure has at most one source log and one boundary log, with no same-layer restatement.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, observability
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.