Skip to content

fix: unblock Fulltext2 ISCP retriever on cancellation - #31859

Merged
XuPeng-SH merged 4 commits into
matrixorigin:mainfrom
jiangxinmeng1:codex/issue25632-fulltext2-cancel
Oct 30, 2026
Merged

XuPeng-SH merged 4 commits into
matrixorigin:mainfrom
jiangxinmeng1:codex/issue25632-fulltext2-cancel

Conversation

@jiangxinmeng1

@jiangxinmeng1 jiangxinmeng1 commented Oct 30, 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:

Fixes #25632

What this PR does / why we need it:

The earlier fix for the ordinary ISCP index consumer did not cover Fulltext2. When the Fulltext2 consumer context is canceled, RunFulltext2 can exit without sending an error to IndexConsumer.Consume. The latter therefore cannot notify a producer blocked in DataRetriever.Next(), and the consumer can remain stuck waiting for that producer.

Publish ctx.Err() through the existing nonblocking error channel on both Fulltext2 cancellation paths. Consume then forwards the error to the retriever and joins the producer. Add a deterministic regression that enters Next(), cancels only the consumer context, and requires Consume to return context.Canceled; the ordinary index cancellation test is the neighboring control.

Validation: gofmt and git diff --check pass. Focused pkg/iscp cancellation and ordinary-index control tests passed on [email protected] (exit 0, including a second run with coverage instrumentation). The original Coverage CI job failed before producing a test JSON report while preparing CGo; its diagnostic artifact uploads hit ECONNRESET. GitHub refused a targeted rerun while the original workflow was still running, so empty commit a634b1d56f retriggers CI without changing source or test inputs. The retried UT Coverage job passed at a634b1d56f (tests and profile upload succeeded). Other CI checks are still pending.

The cancellation check adds one ctx.Err() read per Fulltext2 loop iteration and allocates no new long-lived resource. The existing TailBuilder.Cleanup ownership remains unchanged.

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

@jiangxinmeng1

Copy link
Copy Markdown
Contributor Author

CI follow-up for a634b1d56f: the first UT Coverage job at d5766e4386 exited during CGo preparation before producing a test JSON report, and diagnostic artifact uploads hit ECONNRESET. GitHub refused a single-job rerun while the original workflow was active, so I pushed an empty CI-retry commit; the source tree is unchanged and already contains current upstream/main (d39d8a4034). The new UT Coverage job completed successfully: coverage tests and profile upload passed. I also ran the Fulltext2 cancellation regression and ordinary-index control on [email protected] in normal and -cover modes; both runs exited 0. Other CI checks are still pending.

@jiangxinmeng1

Copy link
Copy Markdown
Contributor Author

已在 6e8bba65de 修复本轮 Coverage gate:旧运行 41020790117 的 Matrixone Coverage execution / Coverage 失败于 changed-code coverage 2/3(66.67%,门槛 >75%);缺失的是 RunFulltext2 在输入等待期间收到 ctx.Done() 的分支。新增测试使用 Context.Done() 的可观察屏障,待 worker 进入该 select 后再取消,避免依赖调度时机。

远程 [email protected] 上的定向覆盖率运行:两个 Fulltext2 取消用例通过;profile 中 fulltext2_consumer.go 的三个变更块(84、85、90 行)执行次数均为 1。最终提交仅额外为测试的完成等待加上超时保护。最终版的远程重跑与 race 构建遇到远程链接进程长时间无进展,已终止;不将它们记作通过。新提交的 GitHub CI 正在运行。

已执行 git merge upstream/main,结果 Already up to date:分支包含当时最新 upstream/main d39d8a40343,无需额外 merge commit。

@XuPeng-SH

XuPeng-SH commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

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

Commit: 6e8bba65de261680596792243728b1a6871e4eec

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: 6e8bba65de261680596792243728b1a6871e4eec

Assessment: approve

The fix correctly propagates Fulltext2 cancellation through the existing retriever shutdown path. No actionable findings remain.

Model: gpt-6-astra / xhigh

Session: 01a1869d-820c-7212-9788-aecfb86a4141 · slot 0 · generation 2

Validation:

  • Reviewed the complete delta, affected owners/consumers, linked issue and all four discussion entries.

  • pkg/iscp passed normal and race suites: 327 test/subtest passes in each.

  • Both new cancellation tests passed 100 race repetitions each.

  • Both regressions failed against baseline production code with the expected cancellation timeouts.

  • Formatting, diff and source-integrity checks passed. Logs and command/source/exit receipts are reconciled in validation-summary.json; source remains unchanged.

Limitations:

  • No live SQL/CDC BVT was run locally. The frozen evidence reports successful exact-head CI, including BVT and coverage; detailed remote logs were unavailable.

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

mergify Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

🚫 Left the queue

49 min in the queue, with no time running CI.

So far

  • ✅ Entered the queue Fri 30 Oct, 11:26 · rule main · triggered by rule Automatic queue on approval for main
  • ⏹️ Testing stopped · in place
  • 🚫 Left the queue 12:14 · 0c94a02

Reason

Pull request #31859 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.

Merge conditions: 2 of 3 met

This pull request

Condition Required by
✅ #review-threads-unresolved = 0 GitHub branch protection
✅ github-review-approved GitHub branch protection

The batch, tested in place

Condition Required by
❌ any of: check-neutral = CI Required, check-skipped = CI Required, check-success = CI Required GitHub branch protection

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

  • Requeue this pull request

Times in UTC · dashboard · how the merge queue works

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]: ISCP index consumer deadlocks after downstream SQL execution fails

3 participants