pingcap / pingcap/ticdc

[P2][Logs] Make invariant and ignore logs actionable

Open
#4,744 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

Messages such as this should not happen and ignore it state a conclusion without showing the invariant, evidence, or impact. That weakens the diagnostic value of the log even when the event is real. This task rewrites invariant and ignore logs so they are actionable during triage.

Modification points

  • For invariant-violation logs, include the violated expectation, the observed value, the impact scope, and the action taken.
  • For ignore logs, explain why the event is safe to ignore, what object was dropped, and which current epoch or state made the decision safe.
  • Remove templates that only express surprise or dismissal without evidence.

Entry points

  • downstreamadapter/dispatcherorchestrator/dispatcher_orchestrator.go:254
  • downstreamadapter/eventcollector/dispatcher_stat.go:688
  • downstreamadapter/eventcollector/dispatcher_stat.go:521
  • downstreamadapter/eventcollector/dispatcher_stat.go:615
  • downstreamadapter/eventcollector/dispatcher_stat.go:681

Done criteria

  • Readers can tell from the log alone whether the event is an expected drop, a recoverable inconsistency, or a correctness risk.
  • this should not happen and ignore it style messages are replaced with evidence-based explanations.
  • The remaining logs consistently include expectation, observation, impact, and action.

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

Start by reading the listed log sites in downstreamadapter/dispatcherorchestrator/dispatcher_orchestrator.go and downstreamadapter/eventcollector/dispatcher_stat.go, especially the specified lines, to understand each event's context. Replace invariant and ignore messages with explanations covering expectation, observation, impact, and action. Done means readers can distinguish expected drops, recoverable inconsistencies, and correctness risks from the logs alone.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, observability-sre
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.