Skip to content

perf(frontend): bound system catalog compatibility lookups by account - #29662

Merged
LeftHandCold merged 2 commits into
matrixorigin:mainfrom
LeftHandCold:fix/system-catalog-account-prefix-20261007
Oct 7, 2026
Merged

LeftHandCold merged 2 commits into
matrixorigin:mainfrom
LeftHandCold:fix/system-catalog-account-prefix-20261007

Conversation

@LeftHandCold

@LeftHandCold LeftHandCold commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Related to #29668: confirmed system-catalog compatibility lookup performance defect in Main and 4.2-dev. The equivalent 4.2-dev fix is #29665.

Problem

checkColExists inspects the schema of the sys-owned mo_pubs / mo_subs
catalogue tables. Its three callers already execute the lookup as sys, but the
SQL omits account_id, the first component of mo_columns' compound primary
key. The lookup therefore scans other tenants' column metadata as account count
grows.

Controlled alternating queries on the same populated catalogue (96 disposable
accounts) returned identical answers. On Main the median unscoped lookup was
17.806 ms versus 0.453 ms for the scoped query; on 4.2 it was 14.808 ms versus
0.442 ms. These are lookup measurements, not an end-to-end DROP speedup.

Minimal change

  • Add account_id = catalog.System_Account to this one compatibility lookup.
  • Preserve tenant publication/subscription data selection, old-schema absence,
    caller context, cancellation and executor errors.
  • Update the dependent exact-SQL mocks and strengthen the existing helper test.
  • Do not cache schema capabilities or change DDL concurrency, retries,
    transactions, SNAPSHOT/PITR locking, catalogue GC or account deletion semantics.

The independent SNAPSHOT convoy described in #29400 is not fixed or closed
by this patch.

Local validation

Base: 281ca809d688f7ff727e813a48436aff1cfbea36; Linux/amd64, actual Go 1.27.0,
matching native CPU generation independently built and provenance-verified.

.agents/skills/mo-dev/scripts/mo-cgo-test -v -count=1 -timeout=120s \
  -run '^Test_checkColExists$' ./pkg/frontend
.agents/skills/mo-dev/scripts/mo-cgo-test -v -count=1 -timeout=600s ./pkg/frontend
.agents/skills/mo-dev/scripts/mo-cgo-test -v -vet=all -count=1 -timeout=120s \
  -run '^Test_checkColExists$' ./pkg/frontend
.agents/skills/mo-dev/scripts/mo-cgo-test -v -count=1 -timeout=300s \
  -run '^TestIssue29414PublicationWaitsForPhysicalDatabaseDrop$' ./pkg/tests/issues

All four commands reached PASS/exit 0. The complete frontend package took
41.375 s; the authenticated two-CN public SQL consumer took 9.957 s and passed
rollback, commit, source replacement and query cancellation.

The seven helper cases cover current/legacy publication and subscription
schemas, SQL failure, a truly canceled context and invalid executor results.
Running the identical cases against the original production SQL fails on the
missing account predicate. This is a query-shape regression assertion, not a
claim of wrong-result reproduction.

Q1-Q3: no new resource owner, waiting edge, goroutine, global state or growth;
the caller still owns BackgroundExec and all failures remain visible.

Configured golangci-lint v2.14.0, built with Go1.27.0, also completed for the
owning frontend package: exit 0, 0 issues. Independent full-diff review found
no remaining blocker. The equivalent small change is separately validated and
submitted to 4.2-dev; this PR targets Main only.

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

@LeftHandCold LeftHandCold left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head a4f91a153de3f76f9856a9ca328f33e5e24250ff against base 281ca809d688f7ff727e813a48436aff1cfbea36. No blocking findings; recommendation: Approve.

  • All three production callers inspect the schema of the sys-owned mo_pubs / mo_subs tables. Bootstrap, catalog-row generation, and the publication catalog migration/column upgrades establish that these definitions belong to account 0. The added predicate does not restrict publication/subscription business rows to sys; existing tenant data filters remain unchanged.
  • The query now supplies all four components of mo_columns' compound primary key: (account_id, att_database, att_relname, attname). This narrows the lookup without adding a cache, lock, transaction, retry, background worker, or resource owner.
  • Legacy-column fallback, caller account context, cancellation/error propagation, and snapshot/restore consumers retain their existing behavior. All six changed files and the seven helper cases were checked; the helper tests pin the scoped SQL and cover legacy absence, executor failure, canceled context, and invalid results.
  • Validation: git diff --check passed. Exact-head CI completed successfully, including Linux/x86 UT, coverage, Linux/arm64 SCA, and multi-CN pessimistic/proxy BVT. Coverage logs confirm the exact head, Go 1.27.0, frontend package selection, and short mode. The separately reported local non-short frontend/2-CN results remain author-provided evidence; I did not rerun heavyweight tests.

The benefit is scoped to this catalog compatibility lookup, not a claim that the separate SNAPSHOT convoy issue #29400 is resolved. No correctness, tenant-isolation, or normal-business performance regression was identified in this change.

Submitted as COMMENT because the authenticated account is the PR author and GitHub disallows a formal self-approval.

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

Reviewed all six changed files at a4f91a153de3f76f9856a9ca328f33e5e24250ff against base/merge-base 281ca809d688f7ff727e813a48436aff1cfbea36. No blocking findings; approve. No subagents used.

The design is appropriately small. checkColExists already owns this compatibility lookup and executes as sys. All three production call sites check the schema of mo_pubs/mo_subs. I traced ordinary-tenant table creation (which excludes these tables), the v2.0.1 publication migration to sys, the sys-scoped column upgrades, and mo_columns row/key construction. The added account_id = 0 identifies the schema owner; the subsequent publication/subscription queries still use their original tenant data filters. The full compound key is (account_id, att_database, att_relname, attname), so completing its equality predicate addresses the unbounded catalog scan at its existing owner.

QA challenges covered a non-sys caller, legacy schemas without the optional columns, execution failure, a canceled context, and invalid executor results. The negative schema result still selects the old query/extractor. Context wrapping preserves cancellation and does not mutate the caller's account identity. Executor/result errors propagate unchanged. Snapshot/restore and account-deletion consumers continue through the same helper. No new cache, state machine, storage format, lock, retry, goroutine, or cleanup owner is introduced; the existing BackgroundExec owner remains responsible for cleanup. This focused optimization does not require a separate feature design document.

Implementation, tests, and documentation were assessed separately: one production SQL change plus its contract comment, five test files, and no repository-document changes. The existing helper test is extended into seven named cases with lightweight per-case mocks; it checks exact query scoping, context identity/cancellation, and success/error results without new services or sleeps. Dependent exact-SQL mocks were updated without weakening their consumer assertions. The query-shape assertion is useful for preventing loss of the leading key predicate; it is not treated as proof of a wrong-result bug or as a performance benchmark.

Validation reused after checking revision, selection, mode, and terminal status:

  • CI run 37594693407 checks this head and completed successfully. Linux/amd64 Go 1.27 UT explicitly selects pkg/frontend under -short -race; the light test stage exits 0. The changed helper test has no short-mode skip or test filter excluding its seven cases. Coverage and Linux/arm64 SCA also passed.
  • The pessimistic multi-CN BVT artifact confirms actual execution: publication_database_identity.sql 29/29, pub_sub2.sql 354/354, and pub_sub4.sql 122/122, with zero failed/ignored/abnormal cases. These supplement source tracing with real tenant/publication/subscription consumer behavior.
  • git diff --check passed and the detached review worktree is clean. I did not rerun equivalent heavyweight suites locally. The PR's non-short frontend/2-CN runs and alternating lookup timings remain author-reported evidence, not new local measurements by this reviewer.

The performance benefit is limited to this schema-capability lookup. Completing the key predicate adds no material hot-path state or maintenance complexity; the reported lookup speedup must not be generalized to end-to-end DROP latency or to resolution of the separate SNAPSHOT convoy in #29400. There are no outstanding code-review threads or previous change requests on this PR to close.

@mergify

mergify Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@LeftHandCold
LeftHandCold merged commit ea01190 into matrixorigin:main Oct 7, 2026
mergify Bot pushed a commit that referenced this pull request Oct 7, 2026
#29669)

Main BigData still spends extra time generating hidden primary keys and appending ordinary CSV values. Reduce those costs at their existing owners. The investigation uses the complete 22-case/340-statement [Main run](https://github.com/matrixorigin/mo-nightly-regression/actions/runs/37489307309) and [4.2 attempt 2](https://github.com/matrixorigin/mo-nightly-regression/actions/runs/37334858166).

- **Hidden primary-key allocation:** #29527 bounds speculative reservations to protect visible AUTO_INCREMENT from huge planner estimates. Bulk fake-PK generation consequently makes frequent allocator requests; private COPY executes allocator metadata SQL repeatedly in its growing transaction workspace. Prefetch now follows successfully assigned actual rows, saturating at 1M, while the initial reservation remains 10k. Qualification requires authoritative hidden fake-PK ownership, default service policy, unit step and default session series. Explicit service/table policies and visible user columns retain their policy. Cold/reset owners obtain the qualification in the existing catalog snapshot.
- **Ordinary append:** skip empty metadata preparation/publication only when the existing scalar, sidecar and preflight state proves the operations have no effect. Keep physical data/bitmap admission, borrowed ownership, JSON checks, metadata transitions and failure rollback.
- **Spill regression coverage:** retain the codec implementation already merged in #29646 unchanged. Consolidate one `BenchmarkSelectedRowsVarlenaDecode` with inline/nullable/64B long values, 23/24B boundaries, VECF32/VECF64, account peak and reusable destinations. Preserve all upstream codec tests and the four distinct PR boundary/capacity/invalid-length/borrowed-owner cases. The real MergeGroup consumer still checks spill/reload, exact DISTINCT values and resource release; its fixed test ledger makes forced spill independent of host pressure.

The allocator change directly applies to no-PK writes and DROP-PK COPY that generate fake keys. ADD-PK COPY is a safety control here; its complete performance difference has additional contributors. Existing #26706 locking, #29664 and all main changes are preserved. No regression-runner or BigData coverage changes are included.

### Review integration and fresh component comparison

[Review 5444104534](#29669 (review)) is addressed by merging current main and removing this PR's duplicate production decoder rewrite. Both conflicting codec files are reconciled; there is one decoder and one benchmark. The former 72%–74% decoder improvement belongs to the now-merged #29646 and is **not** incremental evidence for this PR.

Fresh baseline: `3d796acf87081d48cb01449dce2a34d366534b24`, including #29646 and #29663. Delivery also integrates `ea011906d61dfe2b023993dbbbe2e778459776f8` (#29662); that subsequent frontend catalog lookup change is outside the measured vector/allocator dependency paths. Both benchmark binaries use the exact same fixtures; allocator qualification goes through production `GetAutoColumnFromDef` with a hidden column in both versions. The baseline overlay restores all six remaining production files to the named main revision and excludes only the new private-field UT when compiling the baseline.

Vector measurements use Go1.27.0, Linux/amd64, GOAMD64=v3, GOEXPERIMENT=simd, the same provenance-checked native build, CPU6, GOMAXPROCS=1 and four alternating pairs at 300ms per workload.

| Workload | Fresh result versus main |
| --- | --- |
| 1M actual generated IDs in batches of 8192, private-mode and committed caches | 101 → 8 range requests; 1,010,000 → 1,052,192 reserved values, initial reservation 10k |
| 8192 ordinary BIGINT appends | 34.16% lower component latency; zero allocations retained |
| 8192 ordinary inline / area VARCHAR appends | 15.12% / 17.75% lower component latency; zero allocations retained |
| 8192 NULL BIGINT / VARCHAR appends | 12.56% / 9.92% lower component latency; allocation counts unchanged |
| Prepared / literal / binary-prefix append controls | 0.84% lower / 4.56% higher / 1.01% lower component latency |
| Consolidated main codec control | All 18 shape/size cells pass; 3 heap allocations per reusable decode; no additional decoder speedup claimed |

The literal-prefix cost is an accepted guard overhead outside the ordinary CSV path. The allocator probe uses an in-memory store: its request/reservation counts are evidence, its timing does not reproduce SQL workspace cost. The historical estimate-prefetch control still reserves 2,000,010,000 values in 3 requests; that policy is not restored. These are component measurements, not a completed billion-row or 8-hour acceptance run.

### Validation after integration

- Complete owning/consumer packages pass: vector, incrservice, group and mergeutil (669 top-level tests, all passed). The later frontend-only main commit leaves their tested source/dependency paths unchanged.
- Complete vector/incrservice/group packages pass under race on integrated head `6537884aa4c5b936863f289fe20af43ce91d85f4`.
- Real authenticated two-CN `TestBigDataBulkWriteAndPrimaryKeyCopyPreserveRows` passes in 9.00s: 32,768 rows, cold catalog lookup, ADD/DROP PK COPY, exact values/NULLs/vector payloads, duplicate COPY rejection with continued writes, and visible fake-PK-name user control.
- Existing `TestIssue29602IndexBackfillLocksStayScopedToPrivateTargets` passes in 0.28s, preserving #26706 cross-CN row locks, uniqueness rejection, rollback and release.
- Bulk-demand tests cover 2M IDs in private and committed CREATE owners, explicit config/table/session/step opt-outs, failure, terminal uint64, cold rebuild and cross-CN uniqueness. Existing estimate-gap protections remain and pass.
- Real accounted MergeGroup VECF32/F64 spill/reload checks exact DISTINCT values, NULL and terminal memory/disk/FD release. All upstream codec UTs plus PR boundary, exact-capacity/one-byte-short, borrowed-owner and failed-decode reuse checks pass.
- Fresh paired append measurements, both allocator count probes and all 18 consolidated codec benchmark cells reach PASS. Three independent focused source reviews have no remaining blocker.
- `vet=all` for the five affected/consumer packages passes. Repository-config incremental golangci-lint v2.14.0 (Go1.27) reports zero issues; gofmt and final diff checks pass.

The original-head CI was green before main integration. Its result is historical evidence; the updated head requires its new CI checks before merge.

Commands, with the repository native prerequisites built:

```sh
GOAMD64=v3 GOEXPERIMENT=simd .agents/skills/mo-dev/scripts/mo-cgo-test \
-count=1 -timeout=180s ./pkg/container/vector ./pkg/incrservice \
./pkg/sql/colexec/group ./pkg/objectio/mergeutil
GOAMD64=v3 GOEXPERIMENT=simd .agents/skills/mo-dev/scripts/mo-cgo-test \
-race -count=1 -timeout=180s ./pkg/container/vector ./pkg/incrservice ./pkg/sql/colexec/group
GOAMD64=v3 GOEXPERIMENT=simd .agents/skills/mo-dev/scripts/mo-cgo-test \
-count=1 -timeout=300s \
-run '^(TestBigDataBulkWriteAndPrimaryKeyCopyPreserveRows|TestIssue29602IndexBackfillLocksStayScopedToPrivateTargets)$' \
./pkg/tests/issues
GOAMD64=v3 GOEXPERIMENT=simd .agents/skills/mo-dev/scripts/mo-cgo-test \
-run '^$' -bench '^BenchmarkAutoIDCacheBulkAllocationRequests$' -benchtime=1x ./pkg/incrservice
```

### Limits and follow-up acceptance

Successful assignment demand is not committed-row count; later SQL/transaction failure need not undo it. The adaptive asynchronous span is bounded; synchronous real-batch/concurrency demand retains its existing policy. Qualification adds one catalog aggregate to cold GetColumns, including visible-user tables, rather than each allocation. Frozen BigData YAML and the inspected operator configuration pipeline contain no explicit cache count; the installed Pod TOML was not retrieved. Verify actual activation and remaining critical-path time in the next complete BigData run before claiming end-to-end recovery.

Approved by: @XuPeng-SH
XuPeng-SH added a commit that referenced this pull request Oct 8, 2026
…ement (#29666)

## Summary

This is a small follow-up to the shared broadcast producer ownership
work.
When several independent broadcast probe scopes share one CN, a
HashBuild/map
and its build source must be owned by their common result region, not by
the
first consumer. That consumer may end normally without calling its child
while
a peer still needs the shared build.

Reuse the existing producer-region protocol for repeated-CN
HashJoin/LoopJoin
probe groups. Keep single/packed scopes, unique-CN non-Product scopes,
IndexJoin, ProductL2, DedupJoin and RightDedupJoin unchanged. Do not
change JOIN
semantics, probe placement, result receiver order, scan count,
cancellation
normalization, or add global
serialization. Existing Product ownership remains unchanged; the already
computed groups are reused rather than calculated twice.

The extension is deliberately limited to HashJoin/LoopJoin. Other
HashBuild
operators also have related structure, but their repeated-CN lifecycle
has
not been reproduced and is not changed by this PR. HashJoin's JOIN-type
variants use the same ownership protocol; their algorithms are
unchanged.
The new runtime RED/GREEN is specifically
equi INNER HashJoin and non-equi INNER LoopJoin, **not a claim that
every
operator/type was reproduced in this topology**. Existing owning-package
tests validate the unchanged operator/compiler contracts separately.

The existing producer-region helper runs Dispatch at the coordinator. An
eligible remote build source may therefore acquire one additional
coordinator
Merge relay. Scan count and probe placement are preserved, but this PR
does
**not** claim that every source/network placement is identical or that
public
SQL performance in this remote-source domain has been A/B validated.

## Deterministic contract evidence

The regression fixture uses real compiler probe/build assembly,
finalized
producer ownership, pipeline context initialization and MergeRun. Two
independent colocated HashJoin/LoopJoin probes consume the same build. A
real
outer broadcast INNER join with an empty map normally skips one
consumer,
while the peer still requires three build rows. The first consumer's
cause is
asserted to be ErrPipelineStopped, and the query parent remains live.

On the untouched base, normal consumer cleanup cancels the
still-required
shared source. With the fix, the peer returns the exact expected result.
Additional cases cover first/last skipped consumers, empty peer, all
consumers
skipped, empty build, original build error, partial output then panic,
query
cancel/deadline, ancestor normal stop, and normal/cancelled execution
followed
by Scope.Reset with a fresh allocation-account/pipeline generation.
The reuse test retains internal operator templates; it does not assert
that AP
prepared SQL is supported.

Every scenario joins workers and drains board/spool ownership before
asserting
allocation-account usage is zero. A structural regression explicitly
excludes
IndexJoin and checks final worker reference counts, including downstream
DOP
changes and existing remote groups. Existing Product remote retirement
and
independent result-root contracts remain enabled.

## Important scope boundary

This proves a supported **internal compiler/runtime scope ownership
contract**.
It does not prove an actual SQL planner currently creates the asymmetric
probe
placement in this fixture. It does not establish the first cancellation
owner
or the root cause of Nightly Run 37484909730's information_schema
metadata JOIN
failure. Natural three-CN and DOP=2 incident probes passed without
reaching the
repeated-CN independent-probe domain. Do not interpret this PR as fully
fixing
or closing that incident/Issue #29642. PR #29643 is the already-deployed
Product
ownership fix; it is not the original incident's Issue number.

## Validation

Go 1.27.0; exact-base verified CGo artifacts; CPU 0/1, GOMAXPROCS=2 and
4GiB Go
memory budget. No production cluster or foreign service was touched.

These were run from the MatrixOne worktree with verified native
prerequisites.
The commands below are directly executable with the same Go/native
setup:

```sh
GOTOOLCHAIN=go1.27.0 GOMAXPROCS=2 GOMEMLIMIT=4GiB \
  .agents/skills/mo-dev/scripts/mo-cgo-test -p=2 -count=1 -timeout=180s ./pkg/sql/compile
GOTOOLCHAIN=go1.27.0 GOMAXPROCS=2 GOMEMLIMIT=4GiB \
  .agents/skills/mo-dev/scripts/mo-cgo-test -p=2 -race -count=1 -timeout=180s ./pkg/sql/compile
GOTOOLCHAIN=go1.27.0 GOMAXPROCS=2 GOMEMLIMIT=4GiB \
  .agents/skills/mo-dev/scripts/mo-cgo-test -p=2 -race \
  -run '^TestBroadcastHashJoinSharedProducerOwnership$' -count=2 -timeout=120s ./pkg/sql/compile
GOTOOLCHAIN=go1.27.0 GOMAXPROCS=2 GOMEMLIMIT=4GiB \
  .agents/skills/mo-dev/scripts/mo-cgo-test -p=2 -race \
  -run '^TestBroadcastLoopJoinSharedProducerOwnership$' -count=2 -timeout=120s ./pkg/sql/compile
```

Final narrowed production guard: normal compile package **PASS 7.224s**;
full compile package under `-race` **PASS 9.606s**; exact
HashJoin/LoopJoin
two repetitions **PASS 3.211s / 3.195s**. Before the guard was narrowed
to
these same Hash/Loop paths, each exact test was also adaptively stressed
29
times under race (1.02s measured test, 30s budget): **PASS 30.887s /
31.333s**.

Related runtime package checks were also run:

```sh
GOTOOLCHAIN=go1.27.0 GOMAXPROCS=2 GOMEMLIMIT=4GiB \
  .agents/skills/mo-dev/scripts/mo-cgo-test -p=2 -race -count=1 -timeout=180s \
  ./pkg/sql/colexec/hashbuild ./pkg/sql/colexec/hashjoin ./pkg/sql/colexec/loopjoin \
  ./pkg/sql/colexec/dispatch ./pkg/vm/message ./pkg/vm/pipeline ./pkg/vm/process
```

All seven packages **PASS** (1.973s, 11.624s, 1.676s, 1.316s, 1.219s,
1.188s and 2.262s respectively). This is supporting dependency evidence,
not a public remote-source performance test.

Official Main linter **v2.14.0, built with Go1.27.0** was run with
matching
Go1.27 PATH/GOROOT and repository CGo include/library paths:

```sh
GOTOOLCHAIN=go1.27.0 GOMAXPROCS=2 GOMEMLIMIT=4GiB GOWORK=off \
  CGO_CFLAGS="-I$(pwd)/cgo -I$(pwd)/thirdparties/install/include" \
  CGO_LDFLAGS="-L$(pwd)/thirdparties/install/lib" \
  golangci-lint run --concurrency=2 --timeout=5m -c .golangci.yml ./pkg/sql/compile
git diff --check
```

Final narrowed version: linter **PASS, exit 0, 0 issues**;
`git diff --check` **PASS**. No older Go1.21 or golangci v2.6 tooling
was used
as a final gate. Detailed terminal evidence is retained locally.

Root additionally combined this patch with the independent minimal
vector
and catalogue patches (#29664 and #29662) in a temporary exact-base
worktree.
Full vector/mergeutil/compile/frontend package tests passed; the
authenticated
two-CN `TestIssue29414PublicationWaitsForPhysicalDatabaseDrop` public
SQL
consumer passed rollback, commit, replacement and cancellation (9.660s).
This checks composition and ordinary public SQL behavior; it is **not**
a
natural reproduction or a performance A/B of the special repeated-CN
domain.

---------

Co-authored-by: XuPeng-SH <[email protected]>
XuPeng-SH pushed a commit that referenced this pull request Oct 8, 2026
…#29665)

## What type of PR is this?

- [ ] API-change
- [x] BUG
- [x] Improvement
- [ ] Documentation
- [ ] Feature
- [x] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Related to #29668: the same confirmed system-catalog compatibility
lookup
performance defect. This PR targets `4.2-dev`; #29662 targets Main.
No automatic issue closure: this lookup fix does not prove all nightly
cleanup
deadlines or global DDL lock contention resolved.

## What this PR does / why we need it:

### System-catalog compatibility lookup

Equivalent `4.2-dev` backport of Main #29662. `checkColExists` describes
the
sys-owned `mo_pubs` / `mo_subs` schema, but omits the leading
`account_id` part
of the `mo_columns` compound primary key. Add the existing
`System_Account`
constant to this one compatibility lookup, avoiding other tenants'
metadata.

The three callers still select tenant publication/subscription data
exactly
as before. Preserve old-schema absence, caller context, cancellation,
executor
errors and executor ownership. No capability cache, lifecycle lock
change,
new goroutine, retry, transaction change or resource controller.

Controlled alternating queries on the same 4.2 catalogue (96 disposable
accounts) returned identical answers: median 14.808 ms unscoped versus
0.442 ms scoped. This is lookup cost, **not** an end-to-end DROP
speedup.
The independent global SNAPSHOT convoy in #29400 is not fixed by this
patch.

### CI-only MinIO setup repair

Both attempts of Iceberg run 37595418344 failed before MO startup or
Iceberg
SQL execution: MinIO / mc image pulls from Quay returned `UNAUTHORIZED`.
Anonymous-token registry requests reproduce the denial; the former
Docker
Hub repositories also return 404, so switching registries is not a fix.

Select a CI-only Compose override that reuses the existing Compose BVT
`Dockerfile.minio` / `Dockerfile.mc`. Those definitions download the
same
fixed 2023 release binaries from GitHub and verify their pinned SHA256
values.
The same definitions built successfully in this PR's Compose BVT.

This is restricted to the existing hosted amd64 Iceberg CI job. The
local
development Compose configuration, including its ARM64 selection, is
unchanged.
Iceberg test selection, assertions, failure propagation, timeouts, and
cleanup
are unchanged; the job is not disabled and no retry or skip is added.

## Validation

Original product-change validation, based on
`c3fa851d810306fac9b8dc3381a49d8193f27a19`, actual Go 1.26.4, with an
independently rebuilt matching native library:

```sh
.agents/skills/mo-dev/scripts/mo-cgo-test -v -count=1 -timeout=600s ./pkg/frontend
.agents/skills/mo-dev/scripts/mo-cgo-test -v -vet=all -count=1 -timeout=120s \
  -run '^Test_checkColExists$' ./pkg/frontend
```

Complete frontend PASS (13.821 s) and focused vet/tests PASS. Seven
named
cases cover current/legacy publication and subscription schema, SQL
failure,
a truly canceled context and malformed executor results; assert sys
executor
identity while preserving the caller's tenant identity. Existing
account-drop
and snapshot exact-SQL mocks are updated without relaxing their
assertions.

Configured golangci-lint v2.6.2 / Go1.26.4, changed owning closure
against the
4.2 base: exit 0, `0 issues`. The five-file product/test change and its
three
callers were reviewed. Full Main validation and the authenticated two-CN
publication integration consumer are documented in #29662; they are not
represented as additional 4.2 integration runs.

At product-change head `60f479bdd5`, run 37595419562 passed Ubuntu UT,
arm64
SCA, UT coverage, Proxy Compose BVT, and pessimistic multi-CN BVT. The
BVT
artifact confirms actual publication/subscription cases executed
successfully,
not merely a green workflow summary.

CI repair validation at `50a5b05148`:
- Workflow YAML and unchanged `make test-iceberg-e2e-local` selection:
PASS.
- Actual Docker Compose merged config on server 50: PASS; both CI
services
select the existing checksum-pinned builds without pulling the MinIO
images.
- Default ARM64 development Compose config remains unchanged: PASS.
- `git diff --check`: PASS.
- Server 50's image-build attempt was blocked by connection resets
downloading
GitHub release assets; this is not counted as a successful build or E2E
run.
- Fresh hosted CI:
https://github.com/matrixorigin/matrixone/actions/runs/37782787998
(pending; the final job result, not the advisory workflow summary, is
required).

This branch was previously deployed

1 inactive deployment
ci — 1c5c5678 Deployed Oct 7, 2026 by LeftHandCold
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants