Repository navigation
test(txn): isolate lockservice operation deadlines - #28069
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? |
Merge Queue Status
This pull request spent 3 minutes 58 seconds in the queue, with no time running CI. Waiting for
All conditions
ReasonPull request #28069 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
Failing checks:
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Tick the box to put this pull request back in the merge queue (same as
|
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue #27923 issue #27924 ## What this PR does / why we need it: Cluster-table INSERT statements fell back to the legacy planner, where generated columns could reach the physical write as NULL and INSERT IGNORE was rejected. This change classifies SystemClusterRel as a regular modern DML target so VALUES, INSERT SELECT, prepared INSERT, INSERT IGNORE, and LOAD DATA use generated/default row construction plus MULTI_UPDATE. Multi-table INSERT remains unsupported for cluster tables and now returns a precise NotSupported error. Modern routing preserves the previous special-syntax contract: INSERT OVERWRITE on a cluster table and INSERT with PARTITION values return their existing exact NotSupported errors instead of appending rows or ignoring the partition tuple. The regression coverage reaches these checks through the production BuildPlan entry point. The regression fixture verifies STORED and VIRTUAL generated columns, implicit and explicit account_id placement, serial(id, account_id), dedup planning, special-syntax rejection, and the LOAD path. The cluster-table BVT adds terminal coverage for generated values, composite-key tenant separation, INSERT IGNORE variants, REPLACE/UPDATE/ODKU recomputation, LOAD DATA INLINE, tenant permission errors, exact special-syntax errors, explicit generated-column rejection, and CHECK-failure atomicity. Validation on 9ba9a52: - focused CGo planner tests: PASS; the original regression tests fail on parent ffc8d9f, and the special-syntax BuildPlan test fails on prior PR head d71c8e8 - complete ./pkg/sql/plan CGo test package: PASS - rebased `TestCommitWithLockTablesChanged` after upstream #28069: PASS - make build: PASS - cluster_table BVT: PASS 258/258 twice on one readiness-complete instance; cleanup postconditions PASS - git diff --check: PASS - semantic preflight review: PASS, diff hash b4ad69a703b391306ba0e920379920597e9019f83fdf9028fa69ba70c0696b8b CI is running on the rebased exact head; QA is pending. QA still needs the exact PR build sys/tenant matrix and the 2-CN + Proxy write/reconnect/read smoke. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes matrixorigin#27851 ## What this PR does / why we need it: `runOperatorTestsWithOptions` starts its one-second context before lockservice fixtures are constructed. On a loaded CI runner, Unix-socket, service, and allocator setup can consume that budget, so the first real `Lock` returns `context deadline exceeded` before the test reaches the commit behavior it is meant to verify. This change starts a fresh five-second operation context after each affected lockservice fixture is ready. It covers the reported test and the three adjacent tests with the same setup pattern, while preserving the shared one-second helper guard for the remaining in-memory operator tests. Prerequisite lock acquisition now fails fast so a broken fixture cannot continue into bind-state assertions. Validation on macOS 26.5.1 arm64 with Go 1.26.4, exact head `2180b6c24dec7f4eaf7baf7c09b4f0cf71918a78`: - `GOWORK=off go list -mod=readonly ./pkg/txn/client`: PASS - Four affected tests, normal mode, `-count=100`: PASS - `TestCommitWithLockTablesChanged`, normal mode, `-count=100`: PASS - Each affected test independently under `-race -count=100`: PASS - Full `./pkg/txn/client`, normal and race modes: PASS - `go build -mod=readonly ./pkg/txn/client`: PASS - `go vet -mod=readonly ./pkg/txn/client`: PASS - Semantic preflight: `PASS semantic=PASS`, diff hash `b679eb769e348fbddd41ef8467963b0906b35f59b14032178dc4e40f4bfe7c34` - Exact-head CI run `33731884217`: Ubuntu/x86 UT, shared build, UT coverage, proxy compose BVT, and pessimistic standalone BVT: PASS - arm64 SCA in that run: BLOCKED_EXTERNAL — GitHub reported that the self-hosted runner lost communication with the server; no source diagnostic was emitted - BVT: N/A — this changes only unit-test context lifetime and has no SQL or product entry point - QA required: no — no production behavior, protocol, or public interface changes Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…igin#28088) ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27923 issue matrixorigin#27924 ## What this PR does / why we need it: Cluster-table INSERT statements fell back to the legacy planner, where generated columns could reach the physical write as NULL and INSERT IGNORE was rejected. This change classifies SystemClusterRel as a regular modern DML target so VALUES, INSERT SELECT, prepared INSERT, INSERT IGNORE, and LOAD DATA use generated/default row construction plus MULTI_UPDATE. Multi-table INSERT remains unsupported for cluster tables and now returns a precise NotSupported error. Modern routing preserves the previous special-syntax contract: INSERT OVERWRITE on a cluster table and INSERT with PARTITION values return their existing exact NotSupported errors instead of appending rows or ignoring the partition tuple. The regression coverage reaches these checks through the production BuildPlan entry point. The regression fixture verifies STORED and VIRTUAL generated columns, implicit and explicit account_id placement, serial(id, account_id), dedup planning, special-syntax rejection, and the LOAD path. The cluster-table BVT adds terminal coverage for generated values, composite-key tenant separation, INSERT IGNORE variants, REPLACE/UPDATE/ODKU recomputation, LOAD DATA INLINE, tenant permission errors, exact special-syntax errors, explicit generated-column rejection, and CHECK-failure atomicity. Validation on 9ba9a52: - focused CGo planner tests: PASS; the original regression tests fail on parent ffc8d9f, and the special-syntax BuildPlan test fails on prior PR head d71c8e8 - complete ./pkg/sql/plan CGo test package: PASS - rebased `TestCommitWithLockTablesChanged` after upstream matrixorigin#28069: PASS - make build: PASS - cluster_table BVT: PASS 258/258 twice on one readiness-complete instance; cleanup postconditions PASS - git diff --check: PASS - semantic preflight review: PASS, diff hash b4ad69a703b391306ba0e920379920597e9019f83fdf9028fa69ba70c0696b8b CI is running on the rebased exact head; QA is pending. QA still needs the exact PR build sys/tenant matrix and the 2-CN + Proxy write/reconnect/read smoke. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes matrixorigin#27851 ## What this PR does / why we need it: `runOperatorTestsWithOptions` starts its one-second context before lockservice fixtures are constructed. On a loaded CI runner, Unix-socket, service, and allocator setup can consume that budget, so the first real `Lock` returns `context deadline exceeded` before the test reaches the commit behavior it is meant to verify. This change starts a fresh five-second operation context after each affected lockservice fixture is ready. It covers the reported test and the three adjacent tests with the same setup pattern, while preserving the shared one-second helper guard for the remaining in-memory operator tests. Prerequisite lock acquisition now fails fast so a broken fixture cannot continue into bind-state assertions. Validation on macOS 26.5.1 arm64 with Go 1.26.4, exact head `2180b6c24dec7f4eaf7baf7c09b4f0cf71918a78`: - `GOWORK=off go list -mod=readonly ./pkg/txn/client`: PASS - Four affected tests, normal mode, `-count=100`: PASS - `TestCommitWithLockTablesChanged`, normal mode, `-count=100`: PASS - Each affected test independently under `-race -count=100`: PASS - Full `./pkg/txn/client`, normal and race modes: PASS - `go build -mod=readonly ./pkg/txn/client`: PASS - `go vet -mod=readonly ./pkg/txn/client`: PASS - Semantic preflight: `PASS semantic=PASS`, diff hash `b679eb769e348fbddd41ef8467963b0906b35f59b14032178dc4e40f4bfe7c34` - Exact-head CI run `33731884217`: Ubuntu/x86 UT, shared build, UT coverage, proxy compose BVT, and pessimistic standalone BVT: PASS - arm64 SCA in that run: BLOCKED_EXTERNAL — GitHub reported that the self-hosted runner lost communication with the server; no source diagnostic was emitted - BVT: N/A — this changes only unit-test context lifetime and has no SQL or product entry point - QA required: no — no production behavior, protocol, or public interface changes Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…igin#28088) ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27923 issue matrixorigin#27924 ## What this PR does / why we need it: Cluster-table INSERT statements fell back to the legacy planner, where generated columns could reach the physical write as NULL and INSERT IGNORE was rejected. This change classifies SystemClusterRel as a regular modern DML target so VALUES, INSERT SELECT, prepared INSERT, INSERT IGNORE, and LOAD DATA use generated/default row construction plus MULTI_UPDATE. Multi-table INSERT remains unsupported for cluster tables and now returns a precise NotSupported error. Modern routing preserves the previous special-syntax contract: INSERT OVERWRITE on a cluster table and INSERT with PARTITION values return their existing exact NotSupported errors instead of appending rows or ignoring the partition tuple. The regression coverage reaches these checks through the production BuildPlan entry point. The regression fixture verifies STORED and VIRTUAL generated columns, implicit and explicit account_id placement, serial(id, account_id), dedup planning, special-syntax rejection, and the LOAD path. The cluster-table BVT adds terminal coverage for generated values, composite-key tenant separation, INSERT IGNORE variants, REPLACE/UPDATE/ODKU recomputation, LOAD DATA INLINE, tenant permission errors, exact special-syntax errors, explicit generated-column rejection, and CHECK-failure atomicity. Validation on 9ba9a52: - focused CGo planner tests: PASS; the original regression tests fail on parent ffc8d9f, and the special-syntax BuildPlan test fails on prior PR head d71c8e8 - complete ./pkg/sql/plan CGo test package: PASS - rebased `TestCommitWithLockTablesChanged` after upstream matrixorigin#28069: PASS - make build: PASS - cluster_table BVT: PASS 258/258 twice on one readiness-complete instance; cleanup postconditions PASS - git diff --check: PASS - semantic preflight review: PASS, diff hash b4ad69a703b391306ba0e920379920597e9019f83fdf9028fa69ba70c0696b8b CI is running on the rebased exact head; QA is pending. QA still needs the exact PR build sys/tenant matrix and the 2-CN + Proxy write/reconnect/read smoke. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes matrixorigin#27851 ## What this PR does / why we need it: `runOperatorTestsWithOptions` starts its one-second context before lockservice fixtures are constructed. On a loaded CI runner, Unix-socket, service, and allocator setup can consume that budget, so the first real `Lock` returns `context deadline exceeded` before the test reaches the commit behavior it is meant to verify. This change starts a fresh five-second operation context after each affected lockservice fixture is ready. It covers the reported test and the three adjacent tests with the same setup pattern, while preserving the shared one-second helper guard for the remaining in-memory operator tests. Prerequisite lock acquisition now fails fast so a broken fixture cannot continue into bind-state assertions. Validation on macOS 26.5.1 arm64 with Go 1.26.4, exact head `2180b6c24dec7f4eaf7baf7c09b4f0cf71918a78`: - `GOWORK=off go list -mod=readonly ./pkg/txn/client`: PASS - Four affected tests, normal mode, `-count=100`: PASS - `TestCommitWithLockTablesChanged`, normal mode, `-count=100`: PASS - Each affected test independently under `-race -count=100`: PASS - Full `./pkg/txn/client`, normal and race modes: PASS - `go build -mod=readonly ./pkg/txn/client`: PASS - `go vet -mod=readonly ./pkg/txn/client`: PASS - Semantic preflight: `PASS semantic=PASS`, diff hash `b679eb769e348fbddd41ef8467963b0906b35f59b14032178dc4e40f4bfe7c34` - Exact-head CI run `33731884217`: Ubuntu/x86 UT, shared build, UT coverage, proxy compose BVT, and pessimistic standalone BVT: PASS - arm64 SCA in that run: BLOCKED_EXTERNAL — GitHub reported that the self-hosted runner lost communication with the server; no source diagnostic was emitted - BVT: N/A — this changes only unit-test context lifetime and has no SQL or product entry point - QA required: no — no production behavior, protocol, or public interface changes Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…igin#28088) ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27923 issue matrixorigin#27924 ## What this PR does / why we need it: Cluster-table INSERT statements fell back to the legacy planner, where generated columns could reach the physical write as NULL and INSERT IGNORE was rejected. This change classifies SystemClusterRel as a regular modern DML target so VALUES, INSERT SELECT, prepared INSERT, INSERT IGNORE, and LOAD DATA use generated/default row construction plus MULTI_UPDATE. Multi-table INSERT remains unsupported for cluster tables and now returns a precise NotSupported error. Modern routing preserves the previous special-syntax contract: INSERT OVERWRITE on a cluster table and INSERT with PARTITION values return their existing exact NotSupported errors instead of appending rows or ignoring the partition tuple. The regression coverage reaches these checks through the production BuildPlan entry point. The regression fixture verifies STORED and VIRTUAL generated columns, implicit and explicit account_id placement, serial(id, account_id), dedup planning, special-syntax rejection, and the LOAD path. The cluster-table BVT adds terminal coverage for generated values, composite-key tenant separation, INSERT IGNORE variants, REPLACE/UPDATE/ODKU recomputation, LOAD DATA INLINE, tenant permission errors, exact special-syntax errors, explicit generated-column rejection, and CHECK-failure atomicity. Validation on 9ba9a52: - focused CGo planner tests: PASS; the original regression tests fail on parent ffc8d9f, and the special-syntax BuildPlan test fails on prior PR head d71c8e8 - complete ./pkg/sql/plan CGo test package: PASS - rebased `TestCommitWithLockTablesChanged` after upstream matrixorigin#28069: PASS - make build: PASS - cluster_table BVT: PASS 258/258 twice on one readiness-complete instance; cleanup postconditions PASS - git diff --check: PASS - semantic preflight review: PASS, diff hash b4ad69a703b391306ba0e920379920597e9019f83fdf9028fa69ba70c0696b8b CI is running on the rebased exact head; QA is pending. QA still needs the exact PR build sys/tenant matrix and the 2-CN + Proxy write/reconnect/read smoke. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #27851
What this PR does / why we need it:
runOperatorTestsWithOptionsstarts its one-second context before lockservice fixtures are constructed. On a loaded CI runner, Unix-socket, service, and allocator setup can consume that budget, so the first realLockreturnscontext deadline exceededbefore the test reaches the commit behavior it is meant to verify.This change starts a fresh five-second operation context after each affected lockservice fixture is ready. It covers the reported test and the three adjacent tests with the same setup pattern, while preserving the shared one-second helper guard for the remaining in-memory operator tests. Prerequisite lock acquisition now fails fast so a broken fixture cannot continue into bind-state assertions.
Validation on macOS 26.5.1 arm64 with Go 1.26.4, exact head
2180b6c24dec7f4eaf7baf7c09b4f0cf71918a78:GOWORK=off go list -mod=readonly ./pkg/txn/client: PASS-count=100: PASSTestCommitWithLockTablesChanged, normal mode,-count=100: PASS-race -count=100: PASS./pkg/txn/client, normal and race modes: PASSgo build -mod=readonly ./pkg/txn/client: PASSgo vet -mod=readonly ./pkg/txn/client: PASSPASS semantic=PASS, diff hashb679eb769e348fbddd41ef8467963b0906b35f59b14032178dc4e40f4bfe7c3433731884217: Ubuntu/x86 UT, shared build, UT coverage, proxy compose BVT, and pessimistic standalone BVT: PASS