Repository navigation
fix: stabilize HAKeeper in issue 26114 tests - #28339
Merged
Merged
Conversation
- [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring Fixes matrixorigin#27060 - Moves the issue matrixorigin#26114 cross-account branch tests into the serial `pkg/tests/issues/isolated` package. - Starts and closes a fresh one-CN authenticated cluster for each test instead of reusing the long-lived shared base cluster. - Preserves the original quota, ownership, concurrency, and legacy-metadata assertions while removing interference from earlier heavy embedded-cluster tests. - Focused tests: passed individually twice and together. - Focused race tests: passed; measured 21.49s and 19.07s, with adaptive B=30s and N=1. - Full `pkg/tests/issues/isolated` and `pkg/tests/issues` packages: passed in normal and race modes. - `go vet` for both packages: passed with MatrixOne CGo environment. - `make build`: passed. Co-authored-by: XuPeng-SH <[email protected]>
…#27849) - make the HAKeeper backend read timeout configurable while preserving the 8s production default; - give embedded test clusters a 20s transport budget between the existing 15s heartbeat RPC deadline and 60s store-liveness window; - propagate the timeout to CN, TN, LogService, and the independent schedule-command transport; - preserve explicit test/service overrides and reject negative configuration; - pin the timeout hierarchy in the shared authenticated-cluster fixture used by the reported test. At current main `a15139da62`, `WithTesting()` extends CN/TN heartbeat RPCs to 15s, but every HAKeeper MORPC backend still uses the hard-coded 8s read timeout. Under race/full-UT scheduler pressure, the backend therefore closes the shared transport at 8s, before the heartbeat recovery window expires. The reported job shows both CN backends timing out at 12:13:46 and the `volume_files` DDL failing on the same transport. The failure occurred after matrixorigin#27744 had already merged, so that heartbeat-only fix does not close this remaining timeout inversion. The test-only default is now: `15s heartbeat < 20s backend read < 60s store liveness` Caller contexts still bound individual requests, cluster close still interrupts the connection, and a genuinely dead test transport remains bounded and gets multiple replacement opportunities before store expiry. Production behavior and hot paths are unchanged; the production default remains exactly 8s and the new value is read only when a client connection is created. - `pkg/logservice` full package: PASS (111.424s) - `pkg/embed` full package: PASS (47.479s) - focused config/default/negative/copy tests: PASS - TOML parsing for `backend-read-timeout`: PASS - `TestAuthenticatedTestsReuseBaseCluster` with `-race`: PASS (12.43s) - `TestIssue24727MultiRowPreparedInsertUUIDStrings` with `-race`: PASS, including both interpolation modes (14.50s) - `go vet ./pkg/logservice ./pkg/embed`: PASS No BVT is added because this changes only embedded-test control-plane timing; the SQL behavior and production topology contract are unchanged. Fixes matrixorigin#27846
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? |
XuPeng-SH
approved these changes
Sep 7, 2026
XuPeng-SH
left a comment
Contributor
There was a problem hiding this comment.
Astra(GPT-6)按当前 head fbb2fba 完成多角度复核,结论 APPROVE。
- 将 issue 26114 的两个跨账号 branch 用例移到独立 embedded cluster,保留 quota、ownership、legacy metadata、并发竞争和清理断言;没有把失败改成重试/忽略,也没有删除覆盖目标。
- 15s heartbeat / 20s HAKeeper backend read / 60s store liveness 仅由 WithTesting 注入,生产默认仍为 8s;显式配置可覆盖,负值被拒绝,配置传递链和测试均覆盖。
- 独立 cluster 的启动失败、测试失败和 cleanup 路径均有资源关闭;没有发现跨测试状态污染或把测试修复误当生产根因。
- 代价是两个用例各自启动 cluster,属于为隔离生命周期付出的有界成本;未引入生产 RPC、存储协议或无界后台资源变化。
- 当前 head 的 UT、SCA、Coverage、BVT/Proxy、Iceberg 等实质 CI 均成功(允许的 skipped 除外)。
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #26441
What this PR does / why we need it:
15s heartbeat < 20s backend transport < 60s store liveness.Validation:
pkg/embedcoverage: 84.3%pkg/logservicecoverage: 79.7%go list, CGo-aware build/vet, gofmt, and diff checks passed.