-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Release 6.5.11 hotfix 20260410 #67726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
HunDunDM
wants to merge
12
commits into
pingcap:release-6.5-20241112-v6.5.11
from
HunDunDM:hundundm/260409-empty-region-6511
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
e494cc5
variable: sql_require_primary_key should require SYSTEM_VARIABLES_ADM…
Debra-He 096b116
cherry-pick https://github.com/pingcap/tidb/pull/65084
mjonss 4daec77
infoschema: Exchange partition did not update the potential new AutoI…
mjonss 7170eaa
ddl: fix unstable test TestCreateDropCreateTable (#50076) (#59568)
ti-chi-bot d6f385e
fix test TestExchangeTiDBRowID
Debra-He 0f4cc70
executor: fix load data replace skipped rows
2037443
planner/core: avoid pruning all limit columns
3839685
domain, sessionctx/variable: add stats owner switch
34de45f
ddl, statistics/handle: notify stats on drop schema
832287e
statistics: update old truncate stats for GC
2a82d13
ddl/server: add async force merge for empty table-id regions (#684)
HunDunDM 3790020
address comment
HunDunDM File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reset
runningJobsin place instead of swapping the shared pointer.This hook currently replaces
d.runningJobswhile workers andwait4Switch()can still dereference it concurrently, which creates a real race and can make later checks observe an empty tracker while old goroutines are still updating the previous instance. Also, this registration comes after theEnableDDL()path inStart(), so an early owner retirement can miss the reset entirely.Proposed fix
d.ownerManager.SetBeOwnerHook(func() { var err error d.ddlSeqNumMu.seqNum, err = d.GetNextDDLSeqNum() if err != nil { logutil.BgLogger().Error("error when getting the ddl history count", zap.Error(err)) } d.ddlCtx.setOwnerTS(time.Now().Unix()) }) + d.ownerManager.SetRetireOwnerHook(func() { + d.runningJobs.reset() + }) d.delRangeMgr = d.newDeleteRangeManager(ctxPool == nil) @@ d.wg.Run(d.PollTiFlashRoutine) ingest.InitGlobalLightningEnv() - d.ownerManager.SetRetireOwnerHook(func() { - d.runningJobs = newRunningJobs() - }) return nil }And add a reset helper on
runningJobsthat clears the existing instance under its lock instead of replacing the pointer.🤖 Prompt for AI Agents