Repository navigation
Conversation
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? |
Contributor
|
This pull request is merged. |
This was referenced Nov 27, 2026
1 task done
XuPeng-SH
pushed a commit
that referenced
this pull request
Nov 27, 2026
## What type of PR is this? - [x] Test and CI ## Which issue(s) this PR fixes: Rollout companion to #33247 (no issue closed by this PR). ## What this PR does / why we need it: - Targets `4.2-dev` and changes only `matrixone-ut-coverage` in `.github/workflows/entrypoint.yaml`. - Pins the standby Coverage UT workflow to `matrixorigin/CI@4972bd963f4cc9510266323b14446a8edcda2bfc` (matrixorigin/CI#495), opts in with `enable_4_2_dev: true`, and grants dispatch permissions only on this caller job. Preserves the existing BVT generation, UT/BVT jobs, and the CI workflow's trust and fallback checks. The shared worker was already updated in #33375. ### Rollout prerequisites - Keep this draft and do not merge before #33247 lands and the CI pin is confirmed to admit the merged fixture. The current #33247 head `0241f3c` includes an updated `pkg/fileservice/s3_fs_test.go` after syncing `4.2-dev`: blob `166f8a7c163aaaf27ea4e9294c15b5946cc801a3` is not in the release allowlist in `4972bd9`. That pin would currently route such heads to legacy. Preserve the exact-file gate and review the compatible fixture pin before rollout. ### Validation - Passed actionlint, git diff --check, and a structural YAML comparison verifying that only the Coverage UT caller changed. - After the prerequisite is resolved and the rollout is active, validate one real PR targeting `4.2-dev`: both Coverage UT groups should run on CS, and merged coverage should report to that PR's head. No four-site rerun.
XuPeng-SH
added a commit
that referenced
this pull request
Nov 27, 2026
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: - #32858 ## What this PR does / why we need it: - Compatible rules from active roles now preserve string literals when their predicates are combined. Rules matching Alice and Bob return both rows and exclude rows matching neither rule. - In case-sensitive mode (`lower_case_table_names=0`), rules with differently cased source database or table names remain distinct. If the rules cannot be merged, the existing later-role precedence applies. - With `lower_case_table_names=1`, ADD RULE replaces a case-equivalent entry for the same role with one canonical catalog key in the same transaction. DROP RULE can remove a legacy spelling without affecting another role's entries. The predicate merge uses the source-preserving implementation from #33132. It compares typed projections and table identities under the reader's name semantics and merges the original predicate text using the reader's SQL mode. The rule cache preserves existing prepared handles across equivalent mode changes and invalidates them when the effective rules change. The reporter can verify the three behaviors after merge. ADD RULE validates definitions with the default parser before writing the original SQL. This rejects syntax supported only by the writer's SQL mode and preserves each reader's existing interpretation of the stored rule. Projection matching uses the parser's comparison spelling for function names and aliases. Case-only differences preserve the role union and the emitted SQL retains the original spelling. Legacy catalog keys written with dots inside an identifier still block data access when the key cannot be interpreted. Existing transaction and session recovery statements can run. `DROP RULE` removes the exact legacy key for the specified role. See [the compatibility finding](#33164 (review)). **Validation** - The same SQL inputs reproduced all three failures on the pre-fix baseline. The final commit passed the corresponding SQL assertions, plus direct SQL checks for prepared-handle reuse and invalidation and for `GET_FORMAT` in merged predicates. - Frontend and parser package tests passed, including the parser tree package. The full frontend race run passed, and six focused race tests passed 100 iterations each. Incremental static checks passed. - The local single-CN `zz_accesscontrol` BVT run covered all 43 scripts. Of 3,204 checks, 3,187 passed and 17 had existing ignore markers. There were zero failures or errors. The [original head's CI](https://github.com/matrixorigin/matrixone/actions/runs/45396191332) also passed Ubuntu x86 unit tests, static analysis, and multi-CN Compose BVT. - Rebased head `6a23c1df7419`: the frontend and parser suites, planner `TestShowRewriteMetadata`, `go vet`, incremental golangci-lint, and the service build passed. - Single-CN mo-tester comparison passed all 488 assertions across `role_rule`, `remap_role_rule`, and `role_rule_prepared`. Direct SQL confirmed that rejecting an ANSI_QUOTES-only replacement preserves the installed policy and that `ABS(id)` and `abs(id)` preserve both role-filtered rows. Multi-CN Compose BVT and SCA passed on that head. - Compatibility fix `cbacfd41d283`: reproduced the ADD RULE failure in the [Coverage UT job](https://github.com/matrixorigin/matrixone/actions/runs/45424995129/job/138554891507) and locally. The unchanged `TestCTASCarriesRoleRuleAcrossSQLModesAndRemap` now passes with `-tags matrixone_test -short -covermode=set -coverpkg=./pkg/frontend` and emits a coverage profile. The frontend suite, `go vet`, incremental lint, and service build also passed. Coverage, required CI, and multi-CN Compose BVT subsequently passed for this commit in [run 45439262654](https://github.com/matrixorigin/matrixone/actions/runs/45439262654). - Projection-alias fix `b13e8d60730b`: the new regression test and the existing SQL fixture reproduced the dropped row on the previous head. After the fix, the frontend and parser suites (`mo-cgo-test -tags matrixone_test`), `go vet`, incremental lint, and the service build passed. Single-CN mo-tester passed all 487 assertions across `role_rule`, `remap_role_rule`, and `role_rule_prepared`, including both role-filtered rows in the alias case. GitHub CI will verify the new head across its full configuration. - Conflict rebase `0118de282db3` onto `c90a2c4e5797`: the frontend and parser suites passed with `mo-cgo-test -tags matrixone_test -count=1`. `go vet -tags matrixone_test` passed for frontend and SQL integration. The same wrapper passed `TestCTASCarriesRoleRuleAcrossSQLModesAndRemap` and `TestNativePreparedRoleRuleSurvivesDisabledRemapHint` in `pkg/tests/sqlintegration`. A fresh service build passed all 576 single-CN mo-tester assertions across `role_rule`, `remap_role_rule`, and `role_rule_prepared`, including the upstream and PR fixtures for legacy keys, reader modes, and projection aliases. The [previous head's GitHub CI](https://github.com/matrixorigin/matrixone/actions/runs/45536504062) is historical evidence. Full GitHub CI remains pending for the rebase. - Legacy key recovery `81d49481c4fd`: the new public SQL regression failed on `dd0401022db7` at ROLLBACK and passed after the fix. The fixture seeds the catalog bytes produced by v4.2.8 and verifies rollback, blocked direct and prepared access, exact removal, preservation of another role’s entry, and restored reads. The frontend suite and two related SQL integration tests passed with `-tags matrixone_test -short -count=1`. Focused frontend tests passed with `-race`. `go vet` and incremental golangci-lint passed with `matrixone_test`. A full release-to-target cluster upgrade was not run. The [preceding head’s CI](https://github.com/matrixorigin/matrixone/actions/runs/45770255380/attempts/2) passed. - Rebase onto `a3aae79f39be` at `0824f3b203b8` preserves both role-rule patches byte for byte. The frontend short suite and three focused SQL integration cases passed with `mo-cgo-test -tags matrixone_test -short -count=1`. The SQL cases cover legacy-key recovery, CTAS across SQL modes and remap, and prepared statements with remap disabled. `go vet -tags matrixone_test` passed for frontend and SQL integration. [The prior Coverage UT attempt](https://github.com/matrixorigin/matrixone/actions/runs/45929904248/attempts/2) stopped at worker dispatch. [The upstream rollout](#33375) is included in the new base, and [coverage and required CI passed on the second attempt](https://github.com/matrixorigin/matrixone/actions/runs/45957385124/attempts/2). - Legacy spelling collision fix `663440753b1e` addresses [the recovery finding](#33164 (review)). A live SQL regression seeded the catalog keys and SQL accepted by the v4.2.9 writer. Before the fix, ROLLBACK failed while loading the discarded rule. On the candidate, ROLLBACK and the session's switch to IGNORE_SPACE work, default-mode reads stay blocked, stale prepared statements require re-prepare, and the canonical policy still filters rows. The frontend short suite and four SQL integration cases passed with `mo-cgo-test -tags matrixone_test -short -count=1`; seven focused frontend tests passed with the race detector. Scoped go vet and incremental golangci-lint passed. A full release-to-target upgrade was not run. **Performance and limitations** ADD and DROP scan the affected role's catalog keys inside the existing transaction. A parser-mode transition can reparse the cached rules to check for equivalent behavior. Ordinary cache hits avoid that work. --------- Co-authored-by: XuPeng-SH <[email protected]>
2 tasks done
XuPeng-SH
added a commit
that referenced
this pull request
Dec 2, 2026
## What type of PR is this? - [x] BUG - [x] Improvement ## Which issue(s) this PR fixes: Related to #33203. This is an OOM-risk mitigation, not a claim that the incident's full allocation path is proven or that every OOM is prevented. ## What this PR does / why we need it: Merge candidate sizing already keeps a one-third margin against the TN process-RSS-adjusted headroom, but the final `Acquire` only checked each reservation against the full remaining headroom. Multiple candidates gathered against one snapshot could collectively consume the margin. In the MNL2 16-GiB DN incident, the Merge limit was 12 GiB and the logged outstanding estimated reservations reached 8.312 GiB while RSS rose rapidly; this motivates the aggregate guard but does not prove all RSS growth was caused by Merge. For the specialized Merge throttler, final CAS admission now uses `floor(2/3 × max(0, limit − sampled process RSS)) − existing reservations`. Rejected tasks do not execute or acquire ownership. Ordinary throttlers and the raw `Available()` signal remain unchanged; the rejection log now includes the actual admission-available amount. This adds constant arithmetic without another RSS read. Reduced concurrent Merge admission is intentional. A memory-denied one-shot manual Merge retains its already gathered candidates for a bounded retry instead of silently discarding them. The retry wakes when an active task completes, including when the table is paused and the normal scan interval exceeds the retry window. Completion notifications are tied to the scheduler generation. The same fix is in the `4.2-dev` backport #33249. The follow-up review of #33249 also found three cases present in this main branch: a same-ID table metadata commit could leave a queued retry attached to the old table projection; global memory pressure or `PauseAll` could retain an expired retry and its object metadata; and ordinary headroom recovery could happen after the last retry check but before expiry. This PR now refreshes the existing table projection, expires retries independently of admission, and schedules a final pre-expiry check. A later review found three more shared edges. Named-object inspect Merge now resolves current visible object statistics before estimating and admitting the task. Delayed vacuum callbacks capture their table reference before scheduling, avoiding a race with metadata refresh. A retry gets one final admission attempt when its deadline timer fires slightly late, then its candidates expire after a bounded five-second grace period. The latest review's two scheduler interactions are fixed: a scheduling pass applies empty-trigger backoff once even when many vacuum triggers drain together, and a deferred named-object merge rejects the whole requested set if any input is missing or has a drop intent. The exact-object task constructor checks the current catalog version again when the transaction task is created. Executor rejections retain one-shot work for bounded retry, and the reusable launch pad releases gathered catalog references after ownership transfers to a retry. The scheduler now indexes the tables that actually have queued one-shot work. Task completions share one wake-up per scheduler generation. Pausing a table preserves an already-deferred vacuum assignment and its original deadline. Repeated empty notifications cap ordinary idle backoff at 24 hours, including when they arrive in separate scheduling passes. The inspect command validates the 16-bit object number and rejects repeated object IDs before queuing the request. Different spellings of the same UUID and number identify the same object. ## Validation The branch is based on `main` at `914470d753`. [GitHub CI for `fec087301f`](https://github.com/matrixorigin/matrixone/actions/runs/46717125334). - Five owning packages passed local `go test -race -short -tags=matrixone_test` on Darwin/arm64 with Go 1.27.1. The scope covers the resource throttler, merge scheduler, merge jobs, inspect RPC, and TN service. All six changed Go packages passed scoped `go vet`. - The repository target `make static-check-changed` selected all 511 packages. Full `molint` passed and `golangci-lint` reported zero issues. - All 35 selected scheduler and resource-admission tests and the TN constructor socket test passed 100 race repetitions each. A real TAE transaction rejected a mixed set containing a retired input and then committed a valid two-object merge in `TestMergeBlocksIntoMultipleObjects`. That transaction test passed 81 race repetitions. - The new assertions failed against the pre-fix code for a lost vacuum retry during a table pause, unbounded empty-trigger backoff across passes, and wrapped or duplicate object IDs. - With 10,000 registered tables and one waiter, the median cost of a release, an expiry scan, and a retry-timer calculation fell from 352 µs to 0.172 µs per iteration. Both versions allocated zero bytes per iteration across five samples with one Go CPU. - The previous [Ubuntu unit-test job](https://github.com/matrixorigin/matrixone/actions/runs/46593117591/job/142455718153) reached its two-hour timeout. Its archived test report records passing results for all four packages changed on that revision. <details> <summary>Validation on earlier revisions</summary> - The aggregate-admission regression failed before the production change because a second request was granted after the aggregate margin was exhausted; it passes after the change. - After merging current `main`, full `pkg/common/rscthrottler` and dependent `pkg/vm/engine/tae/db/merge` test suites passed. - The manual-denial, completion-wake, inline-completion, and promotion-reconciliation tests each passed focused `-race -count=100`. The full race suites for both affected packages passed once. - Both affected packages passed build and vet with the repository's CGo prerequisites. - The manual retry regressions cover success after capacity returns, bounded expiry, and a busy paused table whose active task completes within the retry window. - After the follow-up fixes, the full `pkg/vm/engine/tae/db/merge` suite passed, the new regression set passed `-race -count=10`, and the full merge package passed `-race -count=1`. - After merging current `main` at `52ae9b597d`, both affected package suites and scoped `go vet` passed. The two prior review regressions plus the three new regressions passed `-race -count=5`. The preceding CI run passed UT, SCA, and BVT; its Coverage failure was `dedicated worker identity mismatch`, for which `main` now includes #33375 and subsequent Coverage fixes. New CI is pending. - After merging `main` at `38c68d02ca`, the new exact-input, executor-rejection, empty-vacuum, reference-release, and completion-order regressions passed 25 race repetitions. Full `rscthrottler`, Merge scheduler, and Merge job package race suites passed; scoped `go vet`, formatting, and `git diff --check` passed. - The subsequent CI passed Ubuntu UT, ARM64 SCA, and both BVT jobs. Coverage GROUP0 failed because an unrelated TN constructor test bound the shared default TCP port before reaching its metadata-failure assertion. After merging `main` at `ba6081a1ea`, that test uses a private Unix socket and passed 10 consecutive runs while TCP port 22000 was occupied. CI for this head is pending. </details> ## Remaining limits The invariant is against the RSS sample used for each admission attempt. RSS may rise after admission, Merge estimates may understate real allocations, and unrelated TN work can grow. No pre-OOM heap profile exists for the historical incident. This PR does not hard-cap in-flight allocations. A manual request remains pending for at most one minute plus a five-second final-attempt grace after admission denial; if capacity does not return, the scheduler logs its expiry. The separate block-row estimator improvement is already on `main` and was not changed by this PR. --------- Co-authored-by: XuPeng-SH <[email protected]>
This branch was successfully 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:
Related to #33358.
What this PR does / why we need it:
Pin the Coverage UT coordinator and both standby workers to the merged fix in matrixorigin/CI#495 (
4972bd963f4cc9510266323b14446a8edcda2bfc). When a newly dispatched worker briefly returns HTTP 404 or its title has not been indexed, the coordinator re-reads the same run within its existing budget and still requires the complete worker identity before granting admission. Both failure paths were observed in the Coverage rerun for #32989.This rollout updates the three references only. #33176 also contains these pins alongside its worker display and cleanup changes.
b089e42fd54d: actionlint passed for both caller workflows, all three calls match the unchanged reusable workflow input and secret declarations, andgit diff --checkpassed.CI Requiredpasses. The production coordinator and workers resolve the MatrixOne default branch.