Skip to content

ddl: cannot panic with failpoint panic in the DDLNotifier#62151

Merged
ti-chi-bot[bot] merged 3 commits into
pingcap:masterfrom
hawkingrei:60842
Jul 3, 2025
Merged

ddl: cannot panic with failpoint panic in the DDLNotifier#62151
ti-chi-bot[bot] merged 3 commits into
pingcap:masterfrom
hawkingrei:60842

Conversation

@hawkingrei

@hawkingrei hawkingrei commented Jul 2, 2025

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: ref #60842

Problem Summary:

What changed and how does it work?

image

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
@ti-chi-bot ti-chi-bot Bot added do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-tests-checked size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed do-not-merge/needs-tests-checked do-not-merge/needs-triage-completed labels Jul 2, 2025
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
@codecov

codecov Bot commented Jul 2, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 74.9120%. Comparing base (a900a31) to head (0f59641).
Report is 9 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #62151        +/-   ##
================================================
+ Coverage   72.9076%   74.9120%   +2.0043%     
================================================
  Files          1740       1786        +46     
  Lines        482993     491838      +8845     
================================================
+ Hits         352139     368446     +16307     
+ Misses       109256     100348      -8908     
- Partials      21598      23044      +1446     
Flag Coverage Δ
integration 48.8896% <0.0000%> (?)
unit 72.1953% <0.0000%> (+0.0418%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.7804% <ø> (ø)
parser ∅ <ø> (∅)
br 63.1101% <ø> (+16.7650%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hawkingrei

Copy link
Copy Markdown
Contributor Author

/retest

Comment thread pkg/ddl/notifier/subscribe.go Outdated
// In unit tests, we want to panic directly to find the root cause.
if intest.EnableInternalCheck {
panic(r)
if !strings.Contains(util.GetRecoverError(r).Error(), "failpoint") {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if !strings.Contains(util.GetRecoverError(r).Error(), "failpoint") {
if intest.EnableInternalCheck && !strings.Contains(util.GetRecoverError(r).Error(), "failpoint") {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, I have updated.

@@ -337,7 +337,9 @@ func (n *DDLNotifier) OnBecomeOwner() {
}
// In unit tests, we want to panic directly to find the root cause.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to update this comment?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, just skip the failpoint panic.

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
@ti-chi-bot ti-chi-bot Bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jul 3, 2025
@ti-chi-bot ti-chi-bot Bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 3, 2025
@ti-chi-bot

ti-chi-bot Bot commented Jul 3, 2025

Copy link
Copy Markdown

[LGTM Timeline notifier]

Timeline:

  • 2025-07-03 06:16:19.442436118 +0000 UTC m=+1548432.165615101: ☑️ agreed by zimulala.
  • 2025-07-03 06:18:51.633621284 +0000 UTC m=+1548584.356800265: ☑️ agreed by Defined2014.

@ti-chi-bot

ti-chi-bot Bot commented Jul 3, 2025

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Defined2014, tangenta, zimulala

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added the approved label Jul 3, 2025
@hawkingrei

Copy link
Copy Markdown
Contributor Author

/retest

3 similar comments
@hawkingrei

Copy link
Copy Markdown
Contributor Author

/retest

@hawkingrei

Copy link
Copy Markdown
Contributor Author

/retest

@hawkingrei

Copy link
Copy Markdown
Contributor Author

/retest

@ti-chi-bot ti-chi-bot Bot merged commit 1ede6d9 into pingcap:master Jul 3, 2025
27 checks passed
morgo added a commit to morgo/tidb that referenced this pull request Jul 7, 2025
* origin/master: (79 commits)
  backend/local: add rate limiter for split region and ingest data (pingcap#61555)
  fix(runaway): resolve the dead channel in UpdateNewAndDoneWatch (pingcap#61795)
  *: collect subtask summary for `IMPORT INTO` tasks (pingcap#61600)
  tests: update vector cluster test result (pingcap#62174)
  planner: change casetest instance-plan-cache test timeout. (pingcap#62195)
  planner: remove data race for instance plan cache (pingcap#62217)
  *: upgrade pd client to fix keyspace issue (pingcap#62189)
  resource_control: support collecting cross AZ traffic in ru consumption (pingcap#62003)
  test: wait for statistics owner to close on exit (pingcap#62198)
  planner: remove the selection above the table dual (pingcap#62193)
  telemetry: add telemetry related code back (pingcap#61753)
  planner: move physical limit related logic into physical op. (pingcap#62187)
  planner: remove useless code (pingcap#61968)
  retry: enhance retry for ingestor on nextgen (pingcap#62191)
  importinto: encode and ingest step use task keyspace in nextgen (pingcap#62138)
  planner: lift the can-push-to-cop check of aggregation/proj (pingcap#62068)
  ddl: cannot panic with failpoint panic in the DDLNotifier (pingcap#62151)
  planner: skip empty expression in the applyPredicateSimplification (pingcap#62178)
  codec: should also return the value even with error because the error may be ignored in the future (pingcap#62175)
  parser: also reduce literal list with charset (pingcap#61484)
  ...
morgo added a commit to morgo/tidb that referenced this pull request Jul 7, 2025
* origin/master: (79 commits)
  backend/local: add rate limiter for split region and ingest data (pingcap#61555)
  fix(runaway): resolve the dead channel in UpdateNewAndDoneWatch (pingcap#61795)
  *: collect subtask summary for `IMPORT INTO` tasks (pingcap#61600)
  tests: update vector cluster test result (pingcap#62174)
  planner: change casetest instance-plan-cache test timeout. (pingcap#62195)
  planner: remove data race for instance plan cache (pingcap#62217)
  *: upgrade pd client to fix keyspace issue (pingcap#62189)
  resource_control: support collecting cross AZ traffic in ru consumption (pingcap#62003)
  test: wait for statistics owner to close on exit (pingcap#62198)
  planner: remove the selection above the table dual (pingcap#62193)
  telemetry: add telemetry related code back (pingcap#61753)
  planner: move physical limit related logic into physical op. (pingcap#62187)
  planner: remove useless code (pingcap#61968)
  retry: enhance retry for ingestor on nextgen (pingcap#62191)
  importinto: encode and ingest step use task keyspace in nextgen (pingcap#62138)
  planner: lift the can-push-to-cop check of aggregation/proj (pingcap#62068)
  ddl: cannot panic with failpoint panic in the DDLNotifier (pingcap#62151)
  planner: skip empty expression in the applyPredicateSimplification (pingcap#62178)
  codec: should also return the value even with error because the error may be ignored in the future (pingcap#62175)
  parser: also reduce literal list with charset (pingcap#61484)
  ...
morgo added a commit to morgo/tidb that referenced this pull request Jul 7, 2025
* origin/master: (79 commits)
  backend/local: add rate limiter for split region and ingest data (pingcap#61555)
  fix(runaway): resolve the dead channel in UpdateNewAndDoneWatch (pingcap#61795)
  *: collect subtask summary for `IMPORT INTO` tasks (pingcap#61600)
  tests: update vector cluster test result (pingcap#62174)
  planner: change casetest instance-plan-cache test timeout. (pingcap#62195)
  planner: remove data race for instance plan cache (pingcap#62217)
  *: upgrade pd client to fix keyspace issue (pingcap#62189)
  resource_control: support collecting cross AZ traffic in ru consumption (pingcap#62003)
  test: wait for statistics owner to close on exit (pingcap#62198)
  planner: remove the selection above the table dual (pingcap#62193)
  telemetry: add telemetry related code back (pingcap#61753)
  planner: move physical limit related logic into physical op. (pingcap#62187)
  planner: remove useless code (pingcap#61968)
  retry: enhance retry for ingestor on nextgen (pingcap#62191)
  importinto: encode and ingest step use task keyspace in nextgen (pingcap#62138)
  planner: lift the can-push-to-cop check of aggregation/proj (pingcap#62068)
  ddl: cannot panic with failpoint panic in the DDLNotifier (pingcap#62151)
  planner: skip empty expression in the applyPredicateSimplification (pingcap#62178)
  codec: should also return the value even with error because the error may be ignored in the future (pingcap#62175)
  parser: also reduce literal list with charset (pingcap#61484)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants