Repository navigation
fix(tests): renew view query context after cluster restart - #30517
mergify[bot] merged 3 commits into
Conversation
Keep each generation's 180-second query budget separate from lifecycle admission waiting, and cancel both contexts within the owning test. 由 LW 授权的 ChatGPT Personal 智能体提交。
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
由 LW 授权的 ChatGPT Personal 智能体提交。 操作及读回记录:已在本人 fork |
|
接续读回确认(由LW授权的MOI智能体提交):当前 head
head 其后无新提交,无人审阅前不做合并:本 PR 继续等待 @XuPeng-SH 审阅。按规则不合并、不关闭关联 Issue。 |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-xupeng · review
Commit: dd791c5ad72a1c028932b42daea5913d627eb089
Assessment: approve
Reviewed the complete four-line change and lifecycle owners. The restarted generation receives a fresh SQL deadline after admission completes; existing closures use the reassigned context, cancellation remains correctly owned, and all assertions are preserved. No actionable findings remain.
Model: gpt-6-astra / xhigh
Session: 01a14d34-4e51-79a3-a62d-6c9c16279dc8 · slot 0 · generation 0
Validation:
-
Traced context capture, cluster admission/release, restart failure and SQL cleanup paths. No production behavior, fixture or synchronization mechanism changes.
-
Reconciled successful exact-head Ubuntu UT and Linux/arm64 SCA status records. The repository test runner includes the affected package.
-
Verified the target file matches the author-reported tested product commit and SHA256. Intervening base changes do not affect the reviewed timing contract.
-
Static reconciliation passed: clean exact HEAD, matching patch and git diff --check. review-check.log and review-evidence.json match checks/1792313032587577210-3.json, exit 0, in the assigned attempt directory.
Limitations:
-
No local Go tests were executed. Author-reported contention, package and race runs lack retained raw logs in the supplied bundle; CI evidence contains status records.
-
The full linked issue was not supplied. Approval covers this context-lifetime fix, not closure of the broader CI issue.
Merge Queue Status
This pull request spent 1 hour 55 minutes 6 seconds in the queue, including 1 hour 1 minute 47 seconds running CI. Required conditions to merge
|
## What type of PR is this? - [x] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Related to #441. Original failure: [PR #30116 UT job](https://github.com/matrixorigin/matrixone/actions/runs/39092247053/job/117571304261). ## What this PR does / why we need it: Full-cluster `Close → Start` released the port-range file lock between generations, allowing another constructor to acquire the original range and make restart fail. Add `Cluster.Stop()` through the existing dependency-aware shutdown: release completed admission and retain the port lease; final `Close` releases it. Incomplete cleanup retains its owners and dependencies. Migrate intermediate shutdowns in the ten restart consumer files, retaining final cleanup and recovery oracles. No new lifecycle state, allocator, retry or background work is introduced. Rebased onto main `799523418e9f`, preserving #30517's fresh query context after the two-CN restart alongside `Stop`. Also fix the `TestSnapshotMeta` failure from this PR's [Ubuntu UT job](https://github.com/matrixorigin/matrixone/actions/runs/39099178213/job/117591966537). The #30381 optimization installed snapshots dated one second in the past after GC had already reclaimed older objects. Use a fresh timestamp after the existing GC-disable step and keep ten ordered nanosecond offsets. All metadata, checkpoint, restart and `DoCheck` assertions remain; no sleeps, new fixture or production-GC changes are added. A controlled historical-time reproduction fails with three extra old system-table objects; the current-time control passes. Validation on Go 1.27.1, macOS/arm64, repository CGo runner: - Fresh complete `pkg/embed` normal and race suites: 131 test roots / 457 named passes in each mode, plus two existing skips. - TAE owning package in CI short/tagged configuration: 265 roots / 298 named passes, plus the existing `TestUpdate` skip. Exact `TestSnapshotMeta` passes ordinary normal and CI-mode `-short -tags=matrixone_test -race`; all 17 adaptive race repetitions pass. - Fresh complete multicn normal suite and exact `TestViewDescriptionTwoCN` race pass, covering the rebased context handling and retained port lease together. - Previously validated unchanged migrated consumers (Arrow persistence/rollout, MEDIUMINT, AUTO_ID_CACHE reconfiguration, defaults persistence and accepted-commit recovery) retain normal/race evidence. Original deterministic real-flock, cleanup/admission stress and old-behavior negative control remain applicable. - Incremental gofmt, vet, pinned molint and configured golangci-lint over all six affected packages: zero issues. Existing external-MySQL and per-service CN-restart skips in embed, and the existing `TestUpdate` skip in TAE, remain unchanged. No changed target scenario is skipped. Runtime cost is confined to the original embedded lifecycle change: stopped clusters retain their existing port lease until final `Close`. Query execution gains no work. The fixture correction retains one clock read and ten additions. GitHub CI for the updated revision remains pending.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #30451. No automatic issue closure.
What this PR does / why we need it:
由 LW 授权的 ChatGPT Personal 智能体提交。
TestViewDescriptionTwoCNreused its initial three-minute SQL context after releasing and reacquiring the cluster lifecycle lease. A competing package can hold admission beyond that context's deadline: the restart succeeds but the following metadata query fails immediately.Cancel the first generation's context before restart, then create and defer cancellation of a fresh three-minute query context after
cluster.Start()succeeds. Existing SQL, view metadata, persistence, identity and cleanup assertions remain intact. No timeout is extended and admission is unchanged.Scope: 1 file, +4/-0. No validation workflow or injection helper is included.
Product commit:
1c5bc4a36d0362b5a0ffe6c257ec9031fe81b028, parent/tested main3c07fac240311d6f2b706674614ed6034e97ff79.Independent review agent: Approve, including exact remote file/hash, actual test evidence and final delivery object.
Actual verification
Successful fork validation 39098117472, fixed verification commit
83ed8484f8ac69e90620860ea219059d5f476c58, Go 1.27.1 Linux/amd64:make -j2 cgo; original no-contention control passes..agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -vet=all -short -tags=matrixone_test -timeout=20m -v ./pkg/tests/sqlintegration/multicn— 5 root tests pass, 32.641s.gofmt, configuredgo vetwith pinnedmolint, and incrementalgolangci-lint v2.14.0on the owning package pass; lint reports 0 issues.The controlled red/green phases temporarily use an identical bounded private Unix-socket handshake to order the external 185-second lock holder. The driver archives that instrumentation and byte-restores source before ordinary package, race and static gates. Product SHA256
03c0ad5d1a07addb4dd7288977f8ee5f99642bd1dbcc41b8f51757d74a68e523matches the restored green artifact and final commit.Latest main
3fc00709eccc277c175c7a09eed2605ca1aaee29adds only an unrelated PITR error guard and two frontend test changes after the tested base. Independent review confirmed unchanged target, admission, fixture, native inputs and dependencies; the snapshot-restore test does not exercise that PITR failure path. This evidence is for the fixed tested revision, not a claim of testing a silently rebased tree.This is focused Linux contention/owning-package validation, not the original 504-package coverage CI or complete repository CI. Upstream merge CI remains to run after PR creation. No merge or deployment is requested.