You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7398c4f
Browse filesBrowse the repository at this point in the historyBrowse files
### Background
Synchronous helpers can use their caller's execution context, while parameter-only helpers do not need a session. Independent SQL and background execution still need explicit session ownership.
### What problem does this PR solve?
Issue Number: None
Related PR: None
PR Type: Refactor
Problem Summary:
Several helpers created a ConnectContext only to obtain defaults, copy a request or wrap an already owned load task. Remove eight redundant construction sites, reduce view metadata to one context per request and keep statement-only isolation local.
### Details
- **Change map:** 18 production Java files, +168/-232; 11 test files, +465/-71. No generated files or standalone documentation.
- **Moves vs. logic changes:** Pass the current executor and compute group directly; pass the task context through the load coordinator chain. Remove redundant cloud/HTTP contexts and duplicate Flight/MV TLS management. Keep private contexts for independent identity, settings and SQL execution.
- **Behavior change:** Group Commit block rules and audit use the current SQL, user and planner. HTTP Group Commit uses request settings; auto-start without a context or explicit cluster returns no selection. View collection closes statement resources per view without replacing the borrowed statement.
- **Compatibility:** Internal Java call sites migrate together. No protocol, journal, stored format or configuration changes.
- **Performance impact:** Direct construction sites fall from 46 to 38. A metadata request creates at most one context only when a view needs parsing. No new lifecycle state or executor.
- **Rollback:** Revert this commit; no metadata migration.
### Testing
Combined final results: 316 tests passed across 28 FE classes. The initial run passed 27 classes and found two exception-format assertion errors in LoadActionTest. After correcting those test assertions, the repository run-fe-ut.sh script passed all 26 LoadActionTest cases and completed with BUILD SUCCESS. FE Checkstyle and staged diff checks passed. Cluster regression tests were not run.
### Notes for Reviewers
Private execution/identity contexts remain owned by their scope. Synchronous borrowing does not transfer cleanup responsibility. The broader audit found pre-existing MysqlLoad reader, InsertTask cancellation and queryId lookup races; these are documented in the draft PR and not modified here.
### Release note
Group Commit planning uses the active statement's user and SQL for block-rule checks and its planner for audit information.
### Check List (For Author)
- Behavior changed: Yes (see Details).
- Does this need documentation: Yes; ConnectContext's English class comment explains when to create or borrow a context.
- Pre-submission status: Not ready: Draft, awaiting human review; broader audit findings are documented and cluster regression is unrun.
### AI Disclosure
- Tool: OpenAI Codex (GPT-6).
- Generated: Implementation, tests, class comments and PR description.
- Human review: Pending.
0 commit comments