Skip to content

fix: skip stale merge scheduler todo - #24466

Merged
1 commit merged into
matrixorigin:v3.0.6-hotfix-20260321from
aptend:fix/24446-merge-scheduler-nil-supp-v3.0.6
May 20, 2026
Merged

1 commit merged into
matrixorigin:v3.0.6-hotfix-20260321from
aptend:fix/24446-merge-scheduler-nil-supp-v3.0.6

Conversation

@aptend

@aptend aptend commented May 19, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #24446

Backport of #24449 to v3.0.6-hotfix-20260321.

What this PR does / why we need it:

Merge scheduler can keep stale todos in its priority queue after repeated table metadata commits enqueue multiple todos for the same table. If a later DROP removes the table supporter from supps, doSched may still peek an older todo from the queue and panic when it assumes the supporter exists.

This PR skips stale todos whose supporter has already been removed, removing them from the priority queue so the scheduler does not keep peeking the same stale item.

It also adds coverage for the nil-supporter path.

Test:

CGO_CFLAGS="-I/home/mo/matrixone/thirdparties/install/include" CGO_LDFLAGS="-L/home/mo/matrixone/thirdparties/install/lib" LD_LIBRARY_PATH="/home/mo/matrixone/thirdparties/install/lib:${LD_LIBRARY_PATH}" go test -mod=mod ./pkg/vm/engine/tae/db/merge

@aptend
aptend requested a review from XuPeng-SH as a code owner May 19, 2026 08:00
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@mergify mergify Bot added kind/bug Something isn't working kind/test-ci labels May 19, 2026
@ghost
ghost merged commit f80504c into matrixorigin:v3.0.6-hotfix-20260321 May 20, 2026
3 checks passed
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working kind/test-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant