Repository navigation
feat(connection): separate connection lanes for the agent and for jobs - #732
Merged
Merged
Conversation
Every profile had one pool that the editor, schema browsing, backups, restores and the agent (MCP) all took from, so a busy agent or a long dump could leave the editor timing out on "pool timed out" (#731). That also broke FR-6.3.2, which says an agent must not be able to starve the user's connection. Each live connection now has three lanes: - interactive: the existing pool, sized by "Max pool size" (editor, schema browsing, admin); - agent: its own pool (2) for MCP run, run_ddl, explain, stage_write and the agent's schema reads; - job: its own pool (2) for backups and restores. The agent and job lanes connect lazily and close idle connections after 60s, so a session that never uses them costs the server nothing. All lanes share one session setup, so their threads are known as the app's own, and disconnect closes all three. The agent keeps the shared executor, so the user's Cancel still stops what it is running. The pool-exhausted message now names the lane and only suggests "Max pool size" for the interactive one. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019uLE7rJcohc7WDPstJ7yCL
EVWorth
pushed a commit
that referenced
this pull request
Sep 25, 2026
…r's lane main now gives the agent and backups/restores their own connection lanes (#732), so this PR's running-query count and message are reworked on top of that: - The in-flight map records each query's lane, and the count covers only interactive-lane queries. An agent's queries hold none of the editor's connections and were inflating the count; a live test now shows it. - With no editor query running, the message no longer calls it a bug in SQLPilot outright. It names what else holds these connections (schema browsing, the admin panel) and that reconnecting clears a real leak. - The "Pool ran out of connections" warning only fires when the lane is actually holding connections; an empty one timing out is a server that went away. - Agent and job lanes keep their own messages from #732. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019uLE7rJcohc7WDPstJ7yCL
This was referenced Sep 25, 2026
Merged
EVWorth
added a commit
that referenced
this pull request
Oct 5, 2026
Version bump across the three manifests and the two lockfile entries that record the app's own version. What 1.2.0 contains since 1.1.0: - Each editor tab runs on its own server session, so SET @var, temporary tables and multi-run transactions carry across runs (#734) - Separate connection lanes for the agent and for backups/restores, so neither can starve the editor; the pool-exhausted message says what is holding the pool (#732, #727) - Copy button beside Expand for long cell values, such as SHOW CREATE TABLE (#748) - Linux/Wayland: WebKitGTK's DMABUF renderer is turned off, for the black area left after resizing the window (#742) - Tauri 2.12 on both the npm and Rust sides (#749), and the dependency roll-up in #740 - rustls TLS 1.3 advisory RUSTSEC-2026-0285 patched (#728) Also the first release built with rustup in place of dtolnay/rust-toolchain (#746), so the release jobs' toolchain step runs on Windows and macOS for the first time. Claude-Session: https://claude.ai/code/session_01SCNjpC4VgppHSFs7P6rkZg Co-authored-by: Claude <[email protected]>
This was referenced Oct 18, 2026
Merged
EVWorth
added a commit
that referenced
this pull request
Oct 20, 2026
* release: 1.3.0 Version bump across the three manifests and the two lockfile entries that record the app's own version. 1.2.0 and 1.2.1 were bumped but never tagged, so 1.3.0 is the first release since 1.1.0 and carries everything since it: Connections (#731) - Each editor tab runs on its own server session, so SET @var, SET SESSION, temporary tables and multi-run transactions carry over (#734) - Each agent session, and each backup or restore, has connections of its own, so none of them can hold up the editor or each other (#732, #770) - The Min/Max pool size setting and the status-bar pool counter are gone; connections are no longer something to size (#769) - A "busy" error says what is busy and what to wait for (#727) Grid - Grid edits save on the tab's session without committing its open transaction (#762) - Copy a long cell value without opening the viewer (#748) Fixes - Linux: WebKitGTK's DMABUF renderer is off under Wayland (#742) - rustls for RUSTSEC-2026-0285 and RUSTSEC-2026-0346..0349 (#728, #759) - Tauri 2.12.3, tauri-plugin-updater 2.13.3, tauri-plugin-shell 2.5.0 (#749, #747, #758), and dependency roll-ups Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g * fix(deps): bump rustls-webpki and webpki-roots for RUSTSEC-2026-0381..0383 rustls-webpki 0.103.16, webpki-roots and webpki-root-certs 1.0.10. The advisories were published today: certificate verification could accept distrusted intermediates, and the bundled roots still trusted the distrusted emSign intermediates. cargo audit fails on all three, and a release should not ship them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g --------- Co-authored-by: Claude <[email protected]>
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.
Step 1 of #731.
Problem
Every live connection had one pool, and the editor, schema browsing, backups, restores and the agent (MCP) all took from it. A busy agent, or a backup holding its connection for the length of a dump, could leave the editor waiting out the acquire timeout and then failing with "pool timed out". That also broke FR-6.3.2: "a runaway agent query cannot starve the user's."
Change
Each live connection now has three lanes, each its own sqlx pool:
run,run_ddl,explain,stage_write, and the agent's schema readsSET NAMES, recording thread IDs). The admin panel still recognises the agent's and backups' sessions as the app's own and refuses to kill them ([P1] [security] kill_process has no self-protection — can kill own admin connection #433).get_pool/execute/explain/SchemaInspector::newstay on the interactive lane. New:get_lane_pool,execute_in,explain_in,SchemaInspector::for_lane.A deadlock I avoided: a backup's metadata reads stay on the interactive lane. Putting them on the job lane lets two concurrent dumps each hold one of the lane's two slots while waiting for the other, and both time out.
Verification
Run locally against MySQL 8.0 and MariaDB 11 (
docker-compose.test.yml):tests/connection_lanes.rs(7 live tests):cargo test -p mas-core -p mas-admin -p mas-mcp -- --ignored --test-threads=1): backup, restore, staged write, explain, schema, admin and MCP.cargo fmt --check,cargo clippy --all-targets --all-features -D warnings,just test-rustand the TypeScript bindings check all pass. The bindings don't change.Unrelated, but noticed:
tests/backup_dump.rsfails when run in parallel (the default forjust test-integration), because every test drops and recreates the samebackup_dump_probedatabase. It passes with--test-threads=1. This PR doesn't touch that file.Not in this PR
describe_pool_error's signature too, so whichever merges second needs a small rebase.🤖 Generated with Claude Code
https://claude.ai/code/session_019uLE7rJcohc7WDPstJ7yCL
Generated by Claude Code