Skip to content

test: extend multi-CN irregular index rebuild DML coverage - #29688

Merged
mergify[bot] merged 3 commits into
matrixorigin:mainfrom
Ariznawlll:codex/recent-s1-regression-expansion
Oct 9, 2026
Merged

mergify[bot] merged 3 commits into
matrixorigin:mainfrom
Ariznawlll:codex/recent-s1-regression-expansion

Conversation

@Ariznawlll

@Ariznawlll Ariznawlll commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:

Validation

  • focused Go integration test passes for both FULLTEXT2 and HNSW on main bab4b32

@Ariznawlll
Ariznawlll requested a review from XuPeng-SH as a code owner October 8, 2026 03:56
@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 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.

Deep review of 281ef66539617a502f49ccdd31f001629f9cecb9, against bab4b3286a0dd5683a9b291763817722233e586c. APPROVE — no blocking findings.

Design and scope

This is a targeted regression-test extension, not another production fix for #29566. The complete delta is one existing test file (+47/-6); production and documentation deltas are zero. It reuses the existing two-CN cluster, SQL helpers, generation oracle, and second-coordinator rebuild. It adds no cluster, rebuild, state machine, worker, retry, or alternate execution path. Named case fields make the added expectations easier to audit.

The new oracle is meaningful: FULLTEXT2 changes matching IDs from 1,3 to 2,3,4; HNSW changes both membership and ordering to 4,3,1. I traced the HNSW plan consumer: ordering uses the index-returned score, so changing id=1 from [1,0] to [9,0] is not hidden by simply recomputing distance from the source row. Result checks are complemented by a non-NULL, changed build generation; an ALTER no-op cannot pass solely on an already usable index.

The existing remote-scan evidence, source-row count, empty-input rebuild, and rollback checks remain. Resource ownership stays with the isolated cluster and existing connection/row cleanups. SQL calls and rollback cleanup have bounded contexts, the global placement switch is restored, and no new concurrent cleanup or unbounded growth path is introduced.

Independent validation

  • Exact unmodified HEAD, darwin/arm64, Go 1.27.0, matching native build:
    .agents/skills/mo-dev/scripts/mo-cgo-test -json -count=1 -timeout=240s -run '^TestIssue29566IndexRebuildCoordinator$' ./pkg/tests/sqlintegration/multicn
    PASS, both FULLTEXT2 and HNSW; test duration 10.70 s.
  • Same environment and production code, with only the test file overlaid from the declared base: PASS, 9.70 s. These are single observations, not a benchmark. The added work is three DML statements and one flush per algorithm; the observed increment is about one second, with no extra rebuild.
  • Independent negative control: a temporary Go overlay makes TableFuncRequiresCoordinator return false, reintroducing distributed builder placement without changing this PR's assertions. Both cases fail at the second coordinator's result check:
    • FULLTEXT2: expected 2,3,4, actual 2,4.
    • HNSW: expected 4,3,1, actual empty.
      This verifies that the extended test still detects lost remote builder writes, including loss of an unchanged source row. The fault injection is review-only and is not part of the PR.
  • Exact-head Ubuntu UT job passed. I checked the downloaded checkpoint artifact and execution script, not just the rollup: the owning multicn package was built with -race, executed without a test-name filter, and finished with status 0 (05:08:54–05:10:18 UTC).
  • Exact-head SCA passed; local git diff --check and formatting inspection are clean.

Review closure and limits

There are no earlier human reviews or review threads to resolve; the only existing comment is the bot's paused-review notice. No source edits were made for this review.

This approves the bounded regression extension, not a claim of exhaustive CDC/crash-recovery coverage or a production performance improvement. BVT, upgrade and coverage jobs were skipped by CI routing; they are not represented here as executed. There is no production/data-format change, and mixed-version upgrade support is outside this test-only change.

@mergify

mergify Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

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

mergify Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-09 03:14 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • ✅ Checks passed · in-place
  • ✅ Merged — 2026-10-09 04:43 UTC · at dca6ffc2bf21036627b221b67f05943fbe458cf0 · squash

This pull request spent 1 hour 29 minutes 13 seconds in the queue, including 1 hour 25 minutes 39 seconds running CI.

Required conditions to merge

This branch was previously deployed

1 inactive deployment
ci — b04e6a8b Deployed Oct 9, 2026 by mergify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants