Repository navigation
fix(erd): the Diagram reads the catalog on its own read-only session (#1218) - #1224
Merged
Merged
Conversation
…1218) The Diagram tab read the catalog through the SQL editor's session. On PostgreSQL with manual commit that opened a transaction in the editor, an aborted editor transaction broke the diagram, a long editor query delayed it, and the editor's result limit silently cut large schemas at 5000 rows. The workspaces now pass a catalog delegate factory: a read-only session of its own, without the editor's implicit BEGIN. The catalog reads ask for an explicit row limit of 200 000, and a catalog that is still cut is reported as truncated with a notice on the diagram.
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 #1218
What was wrong
The Diagram tab read the catalog through the SQL editor's session:
BEGINon the editor's session, so opening the diagram opened a transaction the user never started.Changes
catalogDelegateFactory: the Diagram uses a read-only session of its own. On PostgreSQL it runs with autocommit, so there is no implicitBEGIN. Without a factory the diagram uses the editor's delegate, as before; no workspace relies on that path now, since extension workspaces hide the Diagram.ErdCatalogasks for an explicit row limit,ErdCatalog.catalogRowLimit= 200 000, the same as MCP.Not in this PR
BEGINon the editor session needs a database.Not verified locally
Tests were not run locally, per the project rule.