Repository navigation
Conversation
…d each list once A catalog read takes the idle session connection when the pool has nothing idle for it, the browse scope's pooled connection is dialed after login, a bulk lease borrows an idle interactive connection, and the switchers read the database and schema lists their owners already hold.
datlechin
enabled auto-merge (squash)
November 26, 2026 01:50
…ssion # Conflicts: # apple/TablePro/Core/Services/Query/SchemaService+CatalogLoad.swift
This branch has not been deployed
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.
Summary
Measured on the unit tests: opening the pool for a catalog read and then a bulk read now dials 1 connection, not 2 (
MetadataConnectionPoolSharingTests); the first catalog read on a fresh connection runs on the session, dialing 0 (MetadataReadLendingTests); opening the database switcher after the sidebar listed the databases reads nothing (DatabaseSwitcherRefreshTests). Statement-log timings at +50 ms were not run here.Left for later, in a comment on the issue: the tree layout's own lists for the browsed scope (C11b of #4459) and the all-schema listing the quick switcher reads for cross-schema search.
Test plan
MetadataReadLendingTestsandMetadataConnectionPoolSharingTests(new),DatabaseSwitcherRefreshTests/switcherTakesTheTreesList(new): each fails on main.ScopedDriverRoutingTests,MetadataConnectionPool*Tests,DatabaseSwitcherRefreshTests,QuickSwitcherViewModelTests,SchemaLeasingLoadTests,DatabaseTreeMetadataServiceTests,SwitchDatabasePooledConnectionTests,DatabaseSwitchLeaseOrderingTests, the new suites): 172 executed, 172 passed after one test setup fix.Closes #4542