syncer(dm): debounce repeated unhandled-event warnings#12579
syncer(dm): debounce repeated unhandled-event warnings#12579ti-chi-bot[bot] merged 6 commits intopingcap:masterfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to aggregate and periodically log unhandled binlog events, replacing immediate warning logs to prevent log flooding. It adds a background cron job that flushes accumulated event counts every five minutes. A review comment suggests optimizing the recordUnhandledEvent function by moving the reflection-based type string generation outside of the mutex lock to reduce contention during the binlog processing path.
|
/retest |
| s.runWg.Add(1) | ||
| go s.updateTSOffsetCronJob(s.runCtx.Ctx) | ||
| s.runWg.Add(1) | ||
| go s.logUnhandledEventsCronJob(s.runCtx.Ctx) |
There was a problem hiding this comment.
can we use SampleLogger inside tidb, instead of a routine to aggregate
|
/retest |
|
@joechenrh: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/retest |
3 similar comments
|
/retest |
|
/retest |
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Benjamin2037, D3Hunter, joechenrh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
What problem does this PR solve?
Issue Number: close #12499
What is changed and how it works?
This change reduces DM syncer log noise from repeated unhandled binlog events.
With the current settings, the sampler allows the first matching warning through once every 5 minutes for the same log message.
Check List
Tests
Questions
Will it cause performance regression or break compatibility?
No material compatibility change. This replaces repeated per-event warning logs with sampled warning logs, which reduces log volume in noisy cases.
Do you need to update user documentation, design documentation or monitoring documentation?
No.
Release note