Repository navigation
fix(frontend): bound prepared long-data buffering - #29199
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? |
|
CI diagnosis and fix at 4882965: both failed runs came from the newly merged standalone-shutdown regression test, not the long-data path. Attempt 1 timed out waiting 5s for the TN drain fault waiter; attempt 2 spent over 3 minutes waiting for embedded-cluster admission, so its 2-minute SQL context had already expired before SQL began. The test now starts fault injection and its SQL deadline after cluster startup, and allows 30s for the drain waiter (matching its other fault waits). Targeted Linux/arm64 coverage-mode test passed 3 consecutive runs. New PR CI is running. |
|
Updated this PR with the latest upstream/main; current head 79c9d52 is MERGEABLE. Re-ran the committed real-CN raw protocol regression at this exact head: go test -p 2 ./pkg/tests/issues/isolated -run ^TestIssue29187LongDataWire$ -count=1 -timeout=10m -v. PASS: TestIssue29187LongDataWire (13.76s), same-cluster-pass-1 (0.02s), same-cluster-pass-2 (0.00s), package ok (13.878s). The test checks exact 1024-byte success, 1025-byte cumulative rejection only at EXECUTE with no unsolicited SEND response, correct-statement error isolation, COM_STMT_RESET and successful same-connection reuse, COM_STMT_CLOSE, COM_QUIT, and a second pass on the same running cluster. The previously reported CMake/JDK HTTP 504 failures occurred in CI setup before project tests; the new head has fresh checks running. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
GPT-6 Astra medium review: APPROVE. Reviewed the complete diff at exact head 79c9d52 against base 161fe8e. The single statement-owned geometric buffer closes cumulative-prefix retention while preserving ownership on allocation failure; execute/reset/close/error/migration paths release or report state correctly. Wire, focused lifecycle, allocator, deferred-error, migration-blocking, race-enabled Linux CI, and git diff check evidence were verified. No blocking functional, lifecycle, compatibility, or validation gap remains.
Merge Queue Status
This pull request spent 4 minutes 45 seconds in the queue, with no time running CI. Waiting for any of
All conditions
ReasonPull request #29199 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.
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?
Which issue(s) this PR fixes:
Fixes #29187
What this PR does / why we need it:
Repeated
COM_STMT_SEND_LONG_DATAchunks previously copied and retained every cumulative prefix in the parameter vector. Buffer each parameter in one statement-owned, geometrically growing off-heap MPool allocation and materialize it into the vector only once at EXECUTE.Enforce the cumulative per-parameter
max_allowed_packetlimit. Since SEND_LONG_DATA has no response, latch failures and report them at EXECUTE; RESET/CLOSE clear the state. Release owned buffers on execution, reset, close, and error paths, and keep deferred failures as migration blockers.Validation
go test ./pkg/frontend -count=1 -timeout=10m(Linux/arm64 Docker).1bcb078e37c4d3f20d1d4e47153b11443bf5cdff: committed real-CN raw MySQL client regression inpkg/tests/issues/isolated/issue_29187_long_data_wire_test.go. Reproduce after building native dependencies:go test -p 2 ./pkg/tests/issues/isolated -run "^TestIssue29187LongDataWire$" -count=2 -timeout=10m -v. Linux/arm64 terminal result: both runs passed, each with two passes against the same live CN cluster; packageokin 27.603s. Each pass verifies exact 1024-byte streamed success, no unsolicited SEND response, 1025-byte cumulative rejection at EXECUTE for the correct statement, unaffected second statement, COM_STMT_RESET and successful same-connection reuse, COM_STMT_CLOSE, and clean connection quit. Focused allocator/close/deferred-error frontend tests passed with-count=5at this head.LENGTH(?)returned 60 MiB.