Repository navigation
fix(ctl): classify invalid flush targets and missing databases - #31792
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? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: dd61c240e5f252576ea202fd76deb4cd5d719346
Assessment: approve
The fix correctly classifies malformed flush targets and missing databases while preserving valid requests and other errors. No actionable defects found.
Model: gpt-6-astra / xhigh
Session: 01a1869d-820c-7212-9788-aecfb86a4141 · slot 0 · generation 2
Validation:
-
Full ctl package passed, including all nine new tests and an additional UTF-8/boundary probe; no skips or failures.
-
Reused successful frozen-head static-analysis and BVT evidence; confirmed SQL case selection.
-
validation-audit.json matches retained logs to successful receipts and verifies native inputs, probe provenance and unchanged source.
-
Complete discussion assessed and required review records saved.
Limitations:
-
Raw CI logs and author local-validation artifacts were unavailable.
-
Author-reported wire checks, BVT repetition and cleanup checks were not independently repeated.
🚫 Left the queue1 h 17 min in the queue, with no time running CI. So far
Reason Pull request #31792 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.
Hint You 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. Merge conditions: 2 of 3 metThis pull request
The batch, tested in place
Tick the box to put this pull request back in the merge queue (same as
Times in UTC · dashboard · how the merge queue works |
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #31663
What this PR does / why we need it:
The TN-backed
mo_ctl('dn', 'flush', ...)handler reported malformed targets as internal failures and could expose the storage engine'sOkExpectedEOBsentinel for an unknown database. It now returns invalid-input error 20301 with a bounded usage hint for malformed targets, and translates only that missing-database sentinel to 1049/42000. Other storage/relation errors, service and privilege checks, and valid numeric/table/tenant targets keep their existing behavior.The malformed-target echo is limited to a 64-byte prefix with a truncation marker. Native regressions drive the real handler with TN metadata, check preserved error identity and decoded successful request payloads, and verify a valid request still works after rejection. A SQL regression checks successful flushes, error classifications and reuse of the same connection.
Validation on the final source:
pkg/sql/plan/function/ctlpackage: original exit 0, 67 PASS rows, no skips or failures; scoped incremental static check: 0 issues.