Skip to content

fix: acknowledge ISCP drain before executor runtime starts - #31167

Merged
XuPeng-SH merged 3 commits into
matrixorigin:mainfrom
jiangxinmeng1:codex/issue-29699
Oct 26, 2026
Merged

XuPeng-SH merged 3 commits into
matrixorigin:mainfrom
jiangxinmeng1:codex/issue-29699

Conversation

@jiangxinmeng1

@jiangxinmeng1 jiangxinmeng1 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

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

Which issue(s) this PR fixes:

Fixes #29699

What this PR does / why we need it:

An async index job can record its CN task runner before that CN publishes an ISCP executor runtime. An immediate DROP fences the job, then previously waited for a runtime that might not start within the 10-second drain budget. This surfaced as an internal readiness error for DROP INDEX, ALTER DROP INDEX, DROP TABLE, and DROP DATABASE.

After installing the CN-scoped fence, the drain handler now acknowledges an authoritative runtime-registry miss. An old executor unregisters only after its workers stop, and a later executor copies the fence before admitting consumers. A synthetic miss from fault injection while a runtime is active still follows the existing wait and drain path. A runtime that stops during the wait is handled the same way. The compile-side lease, runner handoff, and rollback cleanup are unchanged.

Tests cover late runtime registration, fence inheritance and rollback, an active runtime behind a synthetic miss, and runtime disappearance during wait. A public two-CN SQL test creates FULLTEXT2, IVFFLAT, and HNSW indexes, then immediately exercises all four DROP forms. It checks source rows for the index-only drops.

Validation on this branch:

  • make cgo
  • Targeted CN drain handler tests: passed
  • Two-CN SQL test: passed once and in three additional repetitions (12 scenario runs)
  • Targeted CN drain handler race check (-race): passed
  • GPT-6 medium design and final review: no unresolved material finding (review session 01a1762a-eadd-7800-9d78-831f8388132c)

The registry check is local and only runs after the fault-aware lookup misses; it avoids the readiness wait in the genuine absence case. Remote CI has not been monitored.

@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 →

@XuPeng-SH

XuPeng-SH commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · done

Commit: 56b279861f980514598f13f741e543b1162b8606

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

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.

mo-bot review · mo-bot-local · review

Commit: 56b279861f980514598f13f741e543b1162b8606

Assessment: approve

Reviewed the complete delta and lifecycle ownership chain. Acknowledging genuine registry absence is sound: workers stop before unregistration, and later executors inherit the fence before admitting consumers. Active-runtime draining, runner handoff, renewal and rollback cleanup remain intact. The change avoids unnecessary readiness waits without adding state or I/O. No actionable findings remain.

Model: gpt-6-astra / xhigh

Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1

Validation:

  • Reused exact-head CI successes for shared build, UT, UT coverage, arm64 static analysis and two multi-CN BVT jobs.

  • Reviewed deterministic handler coverage for late publication, fence inheritance, rollback and runtime disappearance, alongside existing active-consumer and cancellation tests.

  • Reviewed the new two-CN SQL test covering four DROP forms across FULLTEXT2, IVFFLAT and HNSW.

  • git diff --check passed. Reconciled checks/1792987943479475410-3.json with diff-check.log and the clean assigned source. Evidence and review-audit.json are retained under /home/xupeng/.local/state/mo-bot/jobs/7287edcc8117aab46f6a34b5/attempt-1.

Limitations:

  • Native tests were not repeated locally. Frozen CI includes terminal conclusions without raw logs; author-reported focused race and repetition counts were not independently verified.

  • The SQL test does not force delayed runtime publication; deterministic handler tests cover that boundary.

  • Issue #29699's behavior was assessed from the PR description; no separate frozen issue body was supplied.

@mergify mergify Bot added the queued label Oct 26, 2026
@mergify

mergify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-26 04:14 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • 🟠 Checks running · in-place
  • 🚫 Left the queue — 2026-10-26 05:35 UTC · at d94742c2dc80941031686c8dc1958c0bda970933

This pull request spent 1 hour 20 minutes 22 seconds in the queue, with no time running CI.

Reason

Pull request #31167 has been dequeued

Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.

The author needs to enable "Allow edits from maintainers" on this pull request.

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Tick the box to put this pull request back in the merge queue (same as @mergifyio queue).

  • Requeue this pull request

@XuPeng-SH
XuPeng-SH merged commit b466f4a into matrixorigin:main Oct 26, 2026
25 of 27 checks passed
@mergify mergify Bot added dequeued and removed queued labels Oct 26, 2026

This branch had an error being deployed

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

Labels

dequeued kind/bug Something isn't working size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: DROP INDEX/TABLE/DATABASE can fail soon after async index creation while ISCP executor starts

3 participants