Skip to content

[oracle] Initial connection hangs loading object list after schema switch timeout #2294

Closed

Description

@JX-WANG117

What happened?

On a newly configured Oracle connection, TablePro establishes the session successfully and shows the connection as Connected, but the object list remains in a loading state.

After waiting, the sidebar may eventually show:

Switching to schema 'APP_SCHEMA' timed out.

Retrying produces the same result. This happens on the first open of the connection; no manual schema switch is required.

This appears related to #1807, but differs because it is triggered during the initial connection/schema load on v0.66.0.

Steps to reproduce

  1. Create a valid Oracle 19c connection using a service name.
  2. Set the user/schema normally and save the connection.
  3. Open the connection for the first time.
  4. Observe that TablePro reports the session as connected and identifies Oracle 19c, while the sidebar/object list keeps loading.
  5. Wait for the metadata operation to time out, or click Retry after the error appears.

Expected behavior

Once the Oracle session is connected, the selected schema and its object groups should load. If metadata loading fails, TablePro should show the error once and allow a real retry instead of re-entering the initial-connect loading path.

Database type

Oracle Database 19c Enterprise Edition

TablePro version

  • TablePro 0.66.0 (build 119)
  • Oracle Driver plugin 1.2.20
  • The installed plugin binary matches the official 1.2.20 release binary.

macOS version & chip

macOS 26.6.2 (25G83), Apple Silicon (arm64)

Screenshots / Logs

The unified log repeats the following pattern at approximately 16-second intervals:

[MainContentCoordinator] [schema] initial load deferred until connect connId=<redacted>
[SchemaRefreshService] [schema] refresh failed connId=<redacted> error=Switching to schema 'APP_SCHEMA' timed out.
[MainContentCoordinator] [schema] initial load deferred until connect connId=<redacted>

The network connection itself becomes ready immediately, and the UI reports the session as connected.

Additional diagnostics

The same database was tested independently from the same Mac:

initial connection:                         0.801 s
second concurrent connection:               0.300 s
SELECT current schema:                      0.026 s
ALTER SESSION SET CURRENT_SCHEMA=...:       0.023 s
list users:                                 1.911 s

Both concurrent connections and pings succeeded. This suggests the server, credentials, routing, and the Oracle ALTER SESSION statement are functioning.

A broader schema-object dictionary query took about 12.3 seconds for 43 objects, which may cause some later browsing latency, but it does not explain why TablePro's schema switch itself reaches the fixed 15-second timeout.

Suspected cause

The current source still contains this failure path:

  1. MetadataConnectionPool.openEntry creates a separate metadata driver.
  2. It unconditionally calls switchSchema when the browse scope has a schema.
  3. The operation has a fixed 15-second timeout.
  4. MainContentCoordinator.loadSchema() catches every error, logs initial load deferred until connect, and calls armPostConnectSchemaLoad().
  5. Because a browse scope/session already exists, the coordinator immediately starts another schema load instead of surfacing the actual metadata error.

Relevant source:

  • TablePro/Core/Services/Query/MetadataConnectionPool.swift
  • TablePro/Views/Main/Extensions/MainContentCoordinator+SchemaLoading.swift
  • TablePro/Core/Plugins/PluginMetadataRegistry+RegistryDefaults.swift

Possible fixes:

  • Only defer schema loading for an actual DatabaseError.notConnected; mark other metadata failures as failed and show Retry.
  • Consider setting supportsConnectionPooling: false for Oracle metadata operations so the already-connected session driver is reused.
  • Add a regression test for an Oracle initial connection where metadata switchSchema times out, ensuring it does not enter a retry loop.

Activity

  1. self-assigned this
    on Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions