Skip to content

cluster: PDInstance PostRestart to check for nil updcfg#2697

Open
sgykfjsm wants to merge 1 commit intopingcap:masterfrom
sgykfjsm:fix/2696
Open

cluster: PDInstance PostRestart to check for nil updcfg#2697
sgykfjsm wants to merge 1 commit intopingcap:masterfrom
sgykfjsm:fix/2696

Conversation

@sgykfjsm
Copy link
Copy Markdown

@sgykfjsm sgykfjsm commented Apr 2, 2026

What problem does this PR solve?

close #2696

What is changed and how it works?

Add a nil check to prevent a dereference of updcfg during the standard cluster startup process.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release notes:

NONE

@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot bot commented Apr 2, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign bb7133 for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found 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 requested a review from kaaaaaaang April 2, 2026 18:41
@pingcap-cla-assistant
Copy link
Copy Markdown

pingcap-cla-assistant bot commented Apr 2, 2026

CLA assistant check
All committers have signed the CLA.

@ti-chi-bot ti-chi-bot bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 2, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 42.35%. Comparing base (5a78bf3) to head (201788f).

Files with missing lines Patch % Lines
pkg/cluster/spec/pd.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2697      +/-   ##
==========================================
- Coverage   42.36%   42.35%   -0.01%     
==========================================
  Files         424      424              
  Lines       47018    47018              
==========================================
- Hits        19917    19911       -6     
- Misses      24412    24418       +6     
  Partials     2689     2689              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

cluster: panic: nil pointer dereference in PostRestart when starting with --restore-leaders

2 participants