Repository navigation
fix(function): format IPv4-compatible IPv6 addresses - #28447
Merged
Merged
Conversation
XuPeng-SH
requested review from
LeftHandCold,
aptend and
aunjgr
as code owners
September 8, 2026 19:45
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
force-pushed
the
codex/issue-28389-inet6-compat
branch
from
September 8, 2026 21:02
a4bbc3d to
2f51a22
Compare
Contributor
Author
|
已处理并更新 PR 分支:
|
XuPeng-SH
added a commit
that referenced
this pull request
Sep 9, 2026
## Summary HAKeeper can report a failed MORPC transport generation as `ErrBackendClosed` instead of EOF. The managed client previously reset that generation but returned the error directly, so a transient control-plane disconnect escaped as a SQL failure during `TestIssue26640CrossAccountRestoreRebindsPrivileges`. This change: - retries the transport-generation errors (`ErrBackendClosed`, connect/admission failures, connection reset) through the caller's existing deadline; - makes `managedHAKeeperClient.Close` terminal, prevents late failures from recreating a transport, and makes concurrent `Close` calls join the same cleanup result; - consolidates the retry regressions into deterministic table-driven tests, including deadline, business-error, in-flight-close, and concurrent-close cases. The retry is bounded by every public HAKeeper request context. An allocation whose response is lost may consume an ID range, as the existing EOF retry already did, but the server's monotonic allocator prevents duplicate IDs from being returned. ## Root cause and scope - #28443 failed before its restore/privilege assertions. The embedded LogService first reported checker/raft timing pressure, then MORPC returned `backend connection closed` while allocating an ID. The failure was a downstream control-plane transport error; the deeper first scheduler/WAL/IO fault is not proven by that job. - #28447 is a separate MORPC stream-sequence-gap failure. It was already fixed by merged #28358, which is in this branch's base. The exact regression test passes repeatedly on current main, so this PR intentionally does not duplicate that dispatch implementation. Fixes #28452 Related: #28443, #28447, #28313, #28358 ## Validation - `TestIssue26640CrossAccountRestoreRebindsPrivileges`: `-count=3`, passed. - `TestIssue28313EmptyRemoteDispatch`: `-count=5`, passed. - HAKeeper retry/close focused tests: normal and `-race -count=100`, passed. - `pkg/logservice`: normal and race package runs passed with the known unrelated flaky `TestNewServiceClosesStoreOnReplicaStartFailure` excluded; that test still fails independently with listener address collisions/store-close leakage. - `go vet ./pkg/logservice` with the repository CGo flags and `git diff --check`, passed. ## CI triage for run 34300098985 The source changes in this PR are limited to pkg/logservice. In the exact-head CI run: - Shared build, SCA, normal UT, Compose BVT, and Standalone BVT passed. - The UT coverage producer failed only at the unrelated existing test pkg/sql/compile/TestIssue27261StopSendingDuringParallelReaderBuildStaysGraceful, which returned context canceled; the producer report recorded no build failures and two failed events in pkg/sql/compile. - The downstream coverage merge failed because the required UT producer artifact was incomplete (prerequisites_ready=false); it did not calculate a coverage verdict. - The same TestIssue27261 test passed locally 10 times, and the PR retry/close focused tests passed locally 20 times normally and 100 times under -race; go vet and git diff --check passed. No unrelated compile/pipeline change is included to mask this flaky coverage-only failure. This PR was not rebased and the existing PR base was not changed.
XuPeng-SH
added a commit
that referenced
this pull request
Sep 9, 2026
## Summary Fixes #28282. The CDC watermark race regression test could fail before exercising the lock contract. The fixture task was committed through CN0, while CN1 had not necessarily consumed the corresponding logtail. In `drop_wins`, the guarded watermark INSERT on CN1 could therefore complete with `AffectedRows=0` without requesting the task-row lock; an empty holder wait graph was then reported as a 30-second flaky timeout. This change: - establishes a real CN1 visibility barrier with an independent autocommit read before starting either race ordering; - uses a unique UUID task ID for each ordering so an older fixture generation cannot satisfy that barrier; - reports contender completion before lock admission immediately, including transaction ID, last statement, affected rows, and error; - preserves both lock orderings, exact waiter transaction-ID validation, transaction cleanup/join, and final zero task/watermark assertions. No production CDC or lock-service code is changed. ## Validation - focused two-CN regression: pass; - focused regression with `-race`: pass; - `TestCDCRaceTxn` and `TestCDCWaiterProbe` with `-race -count=3`: pass; - full `pkg/tests/issues` with the known unrelated `TestIssue28313EmptyRemoteDispatch` flaky skipped: pass; - `go vet ./pkg/tests/issues` with repository CGo headers/libs: pass; - `git diff --check`: pass. An unfiltered owning-package run still reproduced the pre-existing `TestIssue28313EmptyRemoteDispatch` / shuffle receiver lifecycle flaky tracked by #28447; it does not touch this change.
This was referenced Sep 12, 2026
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
) Fixes matrixorigin#28389 ## Problem `INET6_NTOA()` formats IPv4-compatible IPv6 values with hexadecimal tails instead of the MySQL-compatible dotted-decimal form. For example, the 16-byte value `000000000000000000000000C0000201` was returned as `::c000:201` instead of `::192.0.2.1`. The binary value produced by `INET6_ATON()` is already correct; this is a formatting-only compatibility bug. ## Root cause The 16-byte path delegated every non-mapped address to Go's `net.IP.String()`. Go emits canonical hexadecimal IPv6 text and does not implement MySQL's IPv4-compatible rendering rule. MySQL's `ipv6_to_str()` renders the tail as dotted decimal only when the first six IPv6 hextets are zero and the seventh hextet is non-zero. This intentionally keeps values such as `::1` and `::100` in hexadecimal form. ## Change - Centralize the 4-byte/16-byte `INET6_NTOA` conversion used by constant, nullable-vector, and ordinary-vector paths. - Preserve existing 4-byte IPv4, IPv4-mapped, ordinary IPv6, NULL, and invalid-length behavior. - Format only the MySQL-compatible IPv4-compatible subset as `::a.b.c.d`. - Add focused unit coverage for dotted, hexadecimal, mapped, ordinary, zero, IPv4, and invalid-length boundaries. - Add BVT coverage for constant, expression round-trip, mixed vector/table, mapped, ordinary IPv6, and NULL paths. ## Validation - `go test ./pkg/sql/plan/function ./pkg/sql/plan -count=1` - `go test -race ./pkg/sql/plan/function -run 'TestInet6NtoaString|TestInet6Ntoa|TestIsIPv4' -count=1` - `go vet -mod=readonly -vettool=/Users/xupeng/code/bin/molint ./pkg/sql/plan/function` - targeted `golangci-lint` with `.golangci.yml`: 0 issues - mo-tester BVT: 14/14 successful, 0 failed - real MatrixOne service comparison against MySQL 8.4.10 confirms `::127.0.0.1`, `::192.0.2.1`, `::255.255.255.255`, while `::1` and `::100` remain unchanged - `git diff --check` passed ## Risk and performance The change is limited to textual formatting after the existing input-length and mapped-address checks. It adds one fixed-size prefix check for 16-byte non-mapped values; no catalog, storage, network, or query-plan behavior changes. Existing outputs outside the targeted IPv4-compatible formatting rule are preserved.
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…gin#28453) ## Summary HAKeeper can report a failed MORPC transport generation as `ErrBackendClosed` instead of EOF. The managed client previously reset that generation but returned the error directly, so a transient control-plane disconnect escaped as a SQL failure during `TestIssue26640CrossAccountRestoreRebindsPrivileges`. This change: - retries the transport-generation errors (`ErrBackendClosed`, connect/admission failures, connection reset) through the caller's existing deadline; - makes `managedHAKeeperClient.Close` terminal, prevents late failures from recreating a transport, and makes concurrent `Close` calls join the same cleanup result; - consolidates the retry regressions into deterministic table-driven tests, including deadline, business-error, in-flight-close, and concurrent-close cases. The retry is bounded by every public HAKeeper request context. An allocation whose response is lost may consume an ID range, as the existing EOF retry already did, but the server's monotonic allocator prevents duplicate IDs from being returned. ## Root cause and scope - matrixorigin#28443 failed before its restore/privilege assertions. The embedded LogService first reported checker/raft timing pressure, then MORPC returned `backend connection closed` while allocating an ID. The failure was a downstream control-plane transport error; the deeper first scheduler/WAL/IO fault is not proven by that job. - matrixorigin#28447 is a separate MORPC stream-sequence-gap failure. It was already fixed by merged matrixorigin#28358, which is in this branch's base. The exact regression test passes repeatedly on current main, so this PR intentionally does not duplicate that dispatch implementation. Fixes matrixorigin#28452 Related: matrixorigin#28443, matrixorigin#28447, matrixorigin#28313, matrixorigin#28358 ## Validation - `TestIssue26640CrossAccountRestoreRebindsPrivileges`: `-count=3`, passed. - `TestIssue28313EmptyRemoteDispatch`: `-count=5`, passed. - HAKeeper retry/close focused tests: normal and `-race -count=100`, passed. - `pkg/logservice`: normal and race package runs passed with the known unrelated flaky `TestNewServiceClosesStoreOnReplicaStartFailure` excluded; that test still fails independently with listener address collisions/store-close leakage. - `go vet ./pkg/logservice` with the repository CGo flags and `git diff --check`, passed. ## CI triage for run 34300098985 The source changes in this PR are limited to pkg/logservice. In the exact-head CI run: - Shared build, SCA, normal UT, Compose BVT, and Standalone BVT passed. - The UT coverage producer failed only at the unrelated existing test pkg/sql/compile/TestIssue27261StopSendingDuringParallelReaderBuildStaysGraceful, which returned context canceled; the producer report recorded no build failures and two failed events in pkg/sql/compile. - The downstream coverage merge failed because the required UT producer artifact was incomplete (prerequisites_ready=false); it did not calculate a coverage verdict. - The same TestIssue27261 test passed locally 10 times, and the PR retry/close focused tests passed locally 20 times normally and 100 times under -race; go vet and git diff --check passed. No unrelated compile/pipeline change is included to mask this flaky coverage-only failure. This PR was not rebased and the existing PR base was not changed.
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…28542) ## Summary Fixes matrixorigin#28282. The CDC watermark race regression test could fail before exercising the lock contract. The fixture task was committed through CN0, while CN1 had not necessarily consumed the corresponding logtail. In `drop_wins`, the guarded watermark INSERT on CN1 could therefore complete with `AffectedRows=0` without requesting the task-row lock; an empty holder wait graph was then reported as a 30-second flaky timeout. This change: - establishes a real CN1 visibility barrier with an independent autocommit read before starting either race ordering; - uses a unique UUID task ID for each ordering so an older fixture generation cannot satisfy that barrier; - reports contender completion before lock admission immediately, including transaction ID, last statement, affected rows, and error; - preserves both lock orderings, exact waiter transaction-ID validation, transaction cleanup/join, and final zero task/watermark assertions. No production CDC or lock-service code is changed. ## Validation - focused two-CN regression: pass; - focused regression with `-race`: pass; - `TestCDCRaceTxn` and `TestCDCWaiterProbe` with `-race -count=3`: pass; - full `pkg/tests/issues` with the known unrelated `TestIssue28313EmptyRemoteDispatch` flaky skipped: pass; - `go vet ./pkg/tests/issues` with repository CGo headers/libs: pass; - `git diff --check`: pass. An unfiltered owning-package run still reproduced the pre-existing `TestIssue28313EmptyRemoteDispatch` / shuffle receiver lifecycle flaky tracked by matrixorigin#28447; it does not touch this change.
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
) Fixes matrixorigin#28389 ## Problem `INET6_NTOA()` formats IPv4-compatible IPv6 values with hexadecimal tails instead of the MySQL-compatible dotted-decimal form. For example, the 16-byte value `000000000000000000000000C0000201` was returned as `::c000:201` instead of `::192.0.2.1`. The binary value produced by `INET6_ATON()` is already correct; this is a formatting-only compatibility bug. ## Root cause The 16-byte path delegated every non-mapped address to Go's `net.IP.String()`. Go emits canonical hexadecimal IPv6 text and does not implement MySQL's IPv4-compatible rendering rule. MySQL's `ipv6_to_str()` renders the tail as dotted decimal only when the first six IPv6 hextets are zero and the seventh hextet is non-zero. This intentionally keeps values such as `::1` and `::100` in hexadecimal form. ## Change - Centralize the 4-byte/16-byte `INET6_NTOA` conversion used by constant, nullable-vector, and ordinary-vector paths. - Preserve existing 4-byte IPv4, IPv4-mapped, ordinary IPv6, NULL, and invalid-length behavior. - Format only the MySQL-compatible IPv4-compatible subset as `::a.b.c.d`. - Add focused unit coverage for dotted, hexadecimal, mapped, ordinary, zero, IPv4, and invalid-length boundaries. - Add BVT coverage for constant, expression round-trip, mixed vector/table, mapped, ordinary IPv6, and NULL paths. ## Validation - `go test ./pkg/sql/plan/function ./pkg/sql/plan -count=1` - `go test -race ./pkg/sql/plan/function -run 'TestInet6NtoaString|TestInet6Ntoa|TestIsIPv4' -count=1` - `go vet -mod=readonly -vettool=/Users/xupeng/code/bin/molint ./pkg/sql/plan/function` - targeted `golangci-lint` with `.golangci.yml`: 0 issues - mo-tester BVT: 14/14 successful, 0 failed - real MatrixOne service comparison against MySQL 8.4.10 confirms `::127.0.0.1`, `::192.0.2.1`, `::255.255.255.255`, while `::1` and `::100` remain unchanged - `git diff --check` passed ## Risk and performance The change is limited to textual formatting after the existing input-length and mapped-address checks. It adds one fixed-size prefix check for 16-byte non-mapped values; no catalog, storage, network, or query-plan behavior changes. Existing outputs outside the targeted IPv4-compatible formatting rule are preserved.
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…gin#28453) ## Summary HAKeeper can report a failed MORPC transport generation as `ErrBackendClosed` instead of EOF. The managed client previously reset that generation but returned the error directly, so a transient control-plane disconnect escaped as a SQL failure during `TestIssue26640CrossAccountRestoreRebindsPrivileges`. This change: - retries the transport-generation errors (`ErrBackendClosed`, connect/admission failures, connection reset) through the caller's existing deadline; - makes `managedHAKeeperClient.Close` terminal, prevents late failures from recreating a transport, and makes concurrent `Close` calls join the same cleanup result; - consolidates the retry regressions into deterministic table-driven tests, including deadline, business-error, in-flight-close, and concurrent-close cases. The retry is bounded by every public HAKeeper request context. An allocation whose response is lost may consume an ID range, as the existing EOF retry already did, but the server's monotonic allocator prevents duplicate IDs from being returned. ## Root cause and scope - matrixorigin#28443 failed before its restore/privilege assertions. The embedded LogService first reported checker/raft timing pressure, then MORPC returned `backend connection closed` while allocating an ID. The failure was a downstream control-plane transport error; the deeper first scheduler/WAL/IO fault is not proven by that job. - matrixorigin#28447 is a separate MORPC stream-sequence-gap failure. It was already fixed by merged matrixorigin#28358, which is in this branch's base. The exact regression test passes repeatedly on current main, so this PR intentionally does not duplicate that dispatch implementation. Fixes matrixorigin#28452 Related: matrixorigin#28443, matrixorigin#28447, matrixorigin#28313, matrixorigin#28358 ## Validation - `TestIssue26640CrossAccountRestoreRebindsPrivileges`: `-count=3`, passed. - `TestIssue28313EmptyRemoteDispatch`: `-count=5`, passed. - HAKeeper retry/close focused tests: normal and `-race -count=100`, passed. - `pkg/logservice`: normal and race package runs passed with the known unrelated flaky `TestNewServiceClosesStoreOnReplicaStartFailure` excluded; that test still fails independently with listener address collisions/store-close leakage. - `go vet ./pkg/logservice` with the repository CGo flags and `git diff --check`, passed. ## CI triage for run 34300098985 The source changes in this PR are limited to pkg/logservice. In the exact-head CI run: - Shared build, SCA, normal UT, Compose BVT, and Standalone BVT passed. - The UT coverage producer failed only at the unrelated existing test pkg/sql/compile/TestIssue27261StopSendingDuringParallelReaderBuildStaysGraceful, which returned context canceled; the producer report recorded no build failures and two failed events in pkg/sql/compile. - The downstream coverage merge failed because the required UT producer artifact was incomplete (prerequisites_ready=false); it did not calculate a coverage verdict. - The same TestIssue27261 test passed locally 10 times, and the PR retry/close focused tests passed locally 20 times normally and 100 times under -race; go vet and git diff --check passed. No unrelated compile/pipeline change is included to mask this flaky coverage-only failure. This PR was not rebased and the existing PR base was not changed.
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…28542) ## Summary Fixes matrixorigin#28282. The CDC watermark race regression test could fail before exercising the lock contract. The fixture task was committed through CN0, while CN1 had not necessarily consumed the corresponding logtail. In `drop_wins`, the guarded watermark INSERT on CN1 could therefore complete with `AffectedRows=0` without requesting the task-row lock; an empty holder wait graph was then reported as a 30-second flaky timeout. This change: - establishes a real CN1 visibility barrier with an independent autocommit read before starting either race ordering; - uses a unique UUID task ID for each ordering so an older fixture generation cannot satisfy that barrier; - reports contender completion before lock admission immediately, including transaction ID, last statement, affected rows, and error; - preserves both lock orderings, exact waiter transaction-ID validation, transaction cleanup/join, and final zero task/watermark assertions. No production CDC or lock-service code is changed. ## Validation - focused two-CN regression: pass; - focused regression with `-race`: pass; - `TestCDCRaceTxn` and `TestCDCWaiterProbe` with `-race -count=3`: pass; - full `pkg/tests/issues` with the known unrelated `TestIssue28313EmptyRemoteDispatch` flaky skipped: pass; - `go vet ./pkg/tests/issues` with repository CGo headers/libs: pass; - `git diff --check`: pass. An unfiltered owning-package run still reproduced the pre-existing `TestIssue28313EmptyRemoteDispatch` / shuffle receiver lifecycle flaky tracked by matrixorigin#28447; it does not touch this change.
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
) Fixes matrixorigin#28389 ## Problem `INET6_NTOA()` formats IPv4-compatible IPv6 values with hexadecimal tails instead of the MySQL-compatible dotted-decimal form. For example, the 16-byte value `000000000000000000000000C0000201` was returned as `::c000:201` instead of `::192.0.2.1`. The binary value produced by `INET6_ATON()` is already correct; this is a formatting-only compatibility bug. ## Root cause The 16-byte path delegated every non-mapped address to Go's `net.IP.String()`. Go emits canonical hexadecimal IPv6 text and does not implement MySQL's IPv4-compatible rendering rule. MySQL's `ipv6_to_str()` renders the tail as dotted decimal only when the first six IPv6 hextets are zero and the seventh hextet is non-zero. This intentionally keeps values such as `::1` and `::100` in hexadecimal form. ## Change - Centralize the 4-byte/16-byte `INET6_NTOA` conversion used by constant, nullable-vector, and ordinary-vector paths. - Preserve existing 4-byte IPv4, IPv4-mapped, ordinary IPv6, NULL, and invalid-length behavior. - Format only the MySQL-compatible IPv4-compatible subset as `::a.b.c.d`. - Add focused unit coverage for dotted, hexadecimal, mapped, ordinary, zero, IPv4, and invalid-length boundaries. - Add BVT coverage for constant, expression round-trip, mixed vector/table, mapped, ordinary IPv6, and NULL paths. ## Validation - `go test ./pkg/sql/plan/function ./pkg/sql/plan -count=1` - `go test -race ./pkg/sql/plan/function -run 'TestInet6NtoaString|TestInet6Ntoa|TestIsIPv4' -count=1` - `go vet -mod=readonly -vettool=/Users/xupeng/code/bin/molint ./pkg/sql/plan/function` - targeted `golangci-lint` with `.golangci.yml`: 0 issues - mo-tester BVT: 14/14 successful, 0 failed - real MatrixOne service comparison against MySQL 8.4.10 confirms `::127.0.0.1`, `::192.0.2.1`, `::255.255.255.255`, while `::1` and `::100` remain unchanged - `git diff --check` passed ## Risk and performance The change is limited to textual formatting after the existing input-length and mapped-address checks. It adds one fixed-size prefix check for 16-byte non-mapped values; no catalog, storage, network, or query-plan behavior changes. Existing outputs outside the targeted IPv4-compatible formatting rule are preserved.
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…gin#28453) ## Summary HAKeeper can report a failed MORPC transport generation as `ErrBackendClosed` instead of EOF. The managed client previously reset that generation but returned the error directly, so a transient control-plane disconnect escaped as a SQL failure during `TestIssue26640CrossAccountRestoreRebindsPrivileges`. This change: - retries the transport-generation errors (`ErrBackendClosed`, connect/admission failures, connection reset) through the caller's existing deadline; - makes `managedHAKeeperClient.Close` terminal, prevents late failures from recreating a transport, and makes concurrent `Close` calls join the same cleanup result; - consolidates the retry regressions into deterministic table-driven tests, including deadline, business-error, in-flight-close, and concurrent-close cases. The retry is bounded by every public HAKeeper request context. An allocation whose response is lost may consume an ID range, as the existing EOF retry already did, but the server's monotonic allocator prevents duplicate IDs from being returned. ## Root cause and scope - matrixorigin#28443 failed before its restore/privilege assertions. The embedded LogService first reported checker/raft timing pressure, then MORPC returned `backend connection closed` while allocating an ID. The failure was a downstream control-plane transport error; the deeper first scheduler/WAL/IO fault is not proven by that job. - matrixorigin#28447 is a separate MORPC stream-sequence-gap failure. It was already fixed by merged matrixorigin#28358, which is in this branch's base. The exact regression test passes repeatedly on current main, so this PR intentionally does not duplicate that dispatch implementation. Fixes matrixorigin#28452 Related: matrixorigin#28443, matrixorigin#28447, matrixorigin#28313, matrixorigin#28358 ## Validation - `TestIssue26640CrossAccountRestoreRebindsPrivileges`: `-count=3`, passed. - `TestIssue28313EmptyRemoteDispatch`: `-count=5`, passed. - HAKeeper retry/close focused tests: normal and `-race -count=100`, passed. - `pkg/logservice`: normal and race package runs passed with the known unrelated flaky `TestNewServiceClosesStoreOnReplicaStartFailure` excluded; that test still fails independently with listener address collisions/store-close leakage. - `go vet ./pkg/logservice` with the repository CGo flags and `git diff --check`, passed. ## CI triage for run 34300098985 The source changes in this PR are limited to pkg/logservice. In the exact-head CI run: - Shared build, SCA, normal UT, Compose BVT, and Standalone BVT passed. - The UT coverage producer failed only at the unrelated existing test pkg/sql/compile/TestIssue27261StopSendingDuringParallelReaderBuildStaysGraceful, which returned context canceled; the producer report recorded no build failures and two failed events in pkg/sql/compile. - The downstream coverage merge failed because the required UT producer artifact was incomplete (prerequisites_ready=false); it did not calculate a coverage verdict. - The same TestIssue27261 test passed locally 10 times, and the PR retry/close focused tests passed locally 20 times normally and 100 times under -race; go vet and git diff --check passed. No unrelated compile/pipeline change is included to mask this flaky coverage-only failure. This PR was not rebased and the existing PR base was not changed.
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…28542) ## Summary Fixes matrixorigin#28282. The CDC watermark race regression test could fail before exercising the lock contract. The fixture task was committed through CN0, while CN1 had not necessarily consumed the corresponding logtail. In `drop_wins`, the guarded watermark INSERT on CN1 could therefore complete with `AffectedRows=0` without requesting the task-row lock; an empty holder wait graph was then reported as a 30-second flaky timeout. This change: - establishes a real CN1 visibility barrier with an independent autocommit read before starting either race ordering; - uses a unique UUID task ID for each ordering so an older fixture generation cannot satisfy that barrier; - reports contender completion before lock admission immediately, including transaction ID, last statement, affected rows, and error; - preserves both lock orderings, exact waiter transaction-ID validation, transaction cleanup/join, and final zero task/watermark assertions. No production CDC or lock-service code is changed. ## Validation - focused two-CN regression: pass; - focused regression with `-race`: pass; - `TestCDCRaceTxn` and `TestCDCWaiterProbe` with `-race -count=3`: pass; - full `pkg/tests/issues` with the known unrelated `TestIssue28313EmptyRemoteDispatch` flaky skipped: pass; - `go vet ./pkg/tests/issues` with repository CGo headers/libs: pass; - `git diff --check`: pass. An unfiltered owning-package run still reproduced the pre-existing `TestIssue28313EmptyRemoteDispatch` / shuffle receiver lifecycle flaky tracked by matrixorigin#28447; it does not touch this change.
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.
Fixes #28389
Problem
INET6_NTOA()formats IPv4-compatible IPv6 values with hexadecimal tails instead of the MySQL-compatible dotted-decimal form. For example, the 16-byte value000000000000000000000000C0000201was returned as::c000:201instead of::192.0.2.1.The binary value produced by
INET6_ATON()is already correct; this is a formatting-only compatibility bug.Root cause
The 16-byte path delegated every non-mapped address to Go's
net.IP.String(). Go emits canonical hexadecimal IPv6 text and does not implement MySQL's IPv4-compatible rendering rule.MySQL's
ipv6_to_str()renders the tail as dotted decimal only when the first six IPv6 hextets are zero and the seventh hextet is non-zero. This intentionally keeps values such as::1and::100in hexadecimal form.Change
INET6_NTOAconversion used by constant, nullable-vector, and ordinary-vector paths.::a.b.c.d.Validation
go test ./pkg/sql/plan/function ./pkg/sql/plan -count=1go test -race ./pkg/sql/plan/function -run 'TestInet6NtoaString|TestInet6Ntoa|TestIsIPv4' -count=1go vet -mod=readonly -vettool=/Users/xupeng/code/bin/molint ./pkg/sql/plan/functiongolangci-lintwith.golangci.yml: 0 issues::127.0.0.1,::192.0.2.1,::255.255.255.255, while::1and::100remain unchangedgit diff --checkpassedRisk and performance
The change is limited to textual formatting after the existing input-length and mapped-address checks. It adds one fixed-size prefix check for 16-byte non-mapped values; no catalog, storage, network, or query-plan behavior changes. Existing outputs outside the targeted IPv4-compatible formatting rule are preserved.