Repository navigation
fix(table): closing a table tab releases its lease without interrupting the shared session (#1215) - #1221
Merged
Conversation
…ng the shared session (#1215) Closing a table browser tab called cancel(interruptIfBusy: true), which interrupted the read-only and table-write sessions of the whole database. Those sessions are shared with the tree, other table tabs, the Relations view and MCP, so one close dropped their connection. cancel no longer closes a pooled session; a statement still running finishes or times out on its own, and the tab's dispose releases its lease.
Grid scroll benchmark
Informational only (threshold 5%). Shared CI runners are noisy; re-run before trusting a single result. |
3 tasks
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.
Refs #1215
What was wrong
Closing a table browser tab called
cancel(interruptIfBusy: true). Despite the name, the PostgreSQL, MySQL and SQLite table delegates interrupted thereadOnlyandtableWritesessions of the database unconditionally. Those sessions are the same objects the tree, the other table tabs, the Relations view and MCP use, so closing one tab dropped the connection under the others.Changes
cancelin the three table delegates no longer closes a pooled session. A statement still running finishes or times out on its own (the timeouts from fix(db): a timeout or a server-side cancel force-closes a shared session, and a queued statement can cancel another caller's #1216 apply).GenericTableView.disposeno longer callscancel(interruptIfBusy: true); the delegate'sdisposereleases the lease.disposeonce andcancelnever.Behaviour change
cancelQuerytocancel, so it no longer interrupts anything. The Relations view does not call it today.Not in this PR
postgres_sequence_view.dart:56,postgres_routine_view.dart:64). Same bug, not part of fix(db): closing a table tab force-closes the read-only session other views are using #1215's list; a follow-up.Not verified locally
Tests were not run locally, per the project rule.