Skip to content

Fix ReadOnlyIntent connections sharing server_id in DuckDB#521

Merged
erikdarlingdata merged 1 commit into
devfrom
fix/readonly-intent-server-id
Mar 11, 2026
Merged

Fix ReadOnlyIntent connections sharing server_id in DuckDB#521
erikdarlingdata merged 1 commit into
devfrom
fix/readonly-intent-server-id

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

  • When the same server was added twice (primary + ReadOnlyIntent for readable replica), both connections produced the same server_id hash because GetServerId() only hashed ServerName. All collected data merged under one ID, making charts identical for both tabs.
  • GetServerNameForStorage() now appends ":RO" when ReadOnlyIntent=true, producing a unique server_id and distinct server_name in DuckDB. Non-RO servers get the same hash as before (no migration needed).
  • Added "(Read-Only)" indicators throughout: sidebar, tab headers, status bar, alerts, tray notifications, overview cards, Manage Servers grid, and MCP tool responses.
  • Status bar now updates on tab switch to reflect the active server.

Test plan

  • Build: 0 errors, 0 warnings
  • Added same Azure SQL DB twice (primary + ReadOnlyIntent) — verified different server_id values in DuckDB
  • Verified charts show independent data per tab
  • Verified "(Read-Only)" appears in sidebar, tabs, status bar, Manage Servers
  • Verified status bar updates when switching between server tabs
  • Verified non-RO servers are unaffected (same hash as before)

🤖 Generated with Claude Code

When the same server was added twice with different ApplicationIntent
(primary vs read-only replica), both produced identical server_id
hashes because GetServerId() only hashed ServerName. All collected
data merged under one ID, making charts identical for both tabs.

Fix: GetServerNameForStorage() appends ":RO" to the server name when
ReadOnlyIntent is true, producing a unique server_id and distinct
server_name in DuckDB. Non-RO servers are unchanged (no migration).

Also adds "(Read-Only)" indicators throughout the UI: sidebar, tab
headers, status bar, alerts, tray notifications, overview cards,
Manage Servers grid, and MCP tool responses. Status bar now updates
on tab switch to reflect the active server.

Tested with Azure SQL DB Business Critical readable replica.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit afe04d2 into dev Mar 11, 2026
3 checks passed
@erikdarlingdata erikdarlingdata deleted the fix/readonly-intent-server-id branch April 10, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant