Repository navigation
test(embed): eliminate redundant branch clear race work - #33581
Merged
Merged
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. |
3 tasks done
XuPeng-SH
added a commit
that referenced
this pull request
Dec 1, 2026
## What type of PR is this? - [x] Improvement - [x] Test and CI - [x] Code Refactoring ## Which issue(s) this PR fixes: Related to #32745 (embedded fixture and UT timeout tracking). Follow-up to #33581. This reduces fixture work and makes no claim that a specific flake is fixed. ## What this PR does / why we need it: Main-target Ubuntu race runs spend substantial time booting temporary clusters and rebuilding publication and account catalogs. The suite can exercise the same lock, restore and authorization outcomes with less setup: - Run the two publication lock scopes in one two-CN fixture. Seed five ordered accounts before the covering-range phase, remove its restored publications, then reuse the accounts for explicit-target locking. Cluster starts fall from 2 to 1 and account creations from 13 to 8. The four-row lock budget, hold/wait ordering, exact grants, retry error, and unrelated account inside the requested key span are still asserted. - Combine apostrophe, backslash and quoted database/publication identifiers in one round-trip replay scenario. Keep two restore attempts and exact comment/metadata assertions, and retain the distinct explicit table, FK, case, empty grant and invalid-view scenarios. - Restore one database snapshot for three distinct empty-table publications. Both restore rounds still check each grant policy, original subscription alias and table metadata, denial of access to private data, and denial after reusing the old published name. This removes two snapshots and four restore calls. Together the two publication snapshot changes reduce database snapshots from 14 to 10 and restore attempts from 28 to 20. - Clean up the two temporary tenants as soon as the cross-account checks finish. The subsequent distinct cluster restore still checks the system database and collation behavior, while its trace shows only the system catalog restored instead of three accounts. ### Validation - `-race -short -tags matrixone_test` passed for the changed embedded roots and SQL integration root, the neighboring publication lifecycle root, and three related frontend tests. The final empty-table restore test reran with the alias checks and cleanup budgets. `gofmt`, `go vet`, and repo `static-check-selected` for both affected packages passed. - A paired local run of the selected embedded race tests on Go 1.27.1/Linux amd64 took 118.72 s before and 95.16 s after (-19.8%). CPU time was 146.11 s to 119.91 s (-17.9%). Process block writes, including logs, were 108.87 MiB to 82.71 MiB (-24.0%). This comparison was taken before the final alias oracle and timeout tightening, which were verified separately. - The SQL integration pair varied in wall time (70.52 to 76.47 s in the broader pair, 47.36 to 29.30 s for the affected root in the reverse-order control). The reproducible result is that two catalog restores are skipped, confirmed by the before/after restore logs. The historical Ubuntu race jobs are [sample 1](https://github.com/matrixorigin/matrixone/actions/runs/46577471337/job/142403778371) and [sample 2](https://github.com/matrixorigin/matrixone/actions/runs/46578858399/job/142408193615). The original lock roots could run in separate shards. The local serial comparison measures selected work and does not establish the overall CI critical path. No production code, BVT coverage or CI scheduling policy changes.
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 #32745 (embedded fixture and suite timeout tracking) and #32003 (the branch-clear regression). This reduces test load. The timing comparison does not establish that a specific flake is fixed.
What this PR does / why we need it:
TestDataBranchAfterTableCleartook 178–291 seconds in four successful main-target Ubuntu/x86 race UT jobs. Two embedded subtests replayed the complete distributed SQL fixtures and accounted for 76–136 seconds of that time. This PR removes those replays and their private SQL/result parser. The distributed files and golden results remain byte-for-byte unchanged. BVT group 1 executed both in a sampled run with 422 passing statements and zero skips.The embedded race test retains the original merge/clear/PICK regression and the source/destination and physical lineage checks. It checks explicit-transaction TRUNCATE rejection, unchanged table identity after rollback, and protection snapshot removal through the existing source-TRUNCATE scenario. The inherited-update test uses three destination tables instead of six and verifies both outcomes for all three conflict policies. The keyed PICK fixture uses 8,194 rows instead of 32,768 and still crosses the 8,192-row input batch boundary, deleting the first key of the second batch and verifying both neighbors. The independent GC and restart tests are unchanged.
Validation
-race -short -tags matrixone_test, four Go cores. The complete changed root and four related frontend roots passed, including transaction rejection, cleanup, conflict, and boundary assertions.This is one sequential comparison (candidate first), using prebuilt race test binaries. The OS accounts block writes for the whole test process, including logs. Cached-read accounting depends on run order and is not used to claim a storage-read improvement.
gofmt,go vet, repositorymolintand incrementalgolangci-lintpassed. The BVT selection test passed under-race, and the current group 1 selector includes both unchanged SQL files.Historical full CI timings provide the workload selection (run 1, run 2). Local A/B results describe the selected test, not the full CI critical path. Test-only changes use the UT CI scope. This PR does not change the runner, timeout, concurrency, or BVT assignment.