fix: resolve MySQL connection state desync after disconnect/reconnect
- Use synchronous pool removal in desktop disconnect_db to prevent race condition when user quickly disconnects and reconnects - Rename recordMetadataLoadError to recordConnectionLostError and export it for cross-store reuse - Sync query execution errors back to connection state via recordConnectionLostError in queryStore catch blocks - Add backend check_connection_health method (dbx-core) with Tauri command and web route for proactive pool verification - Add frontend checkConnectionHealth API (tauri.ts/http.ts/api.ts) - Enhance ensureConnected to verify backend pool health before assuming connection is valid, auto-reconnect if stale
This commit is contained in:
1 parent
4346192713
commit
e2f68de455
10 files changed
+92
-24
No files matched your search
@@ -164,6 +164,10 @@ export async function disconnectDb(connectionId: string): Promise<void> {
|
||||
return post("/api/connection/disconnect", { connectionId });
|
||||
}
|
||||
|
||||
export async function checkConnectionHealth(connectionId: string): Promise<void> {
|
||||
return post("/api/connection/check-health", { connectionId });
|
||||
}
|
||||
|
||||
export async function closeDatabaseConnection(connectionId: string, database: string): Promise<boolean> {
|
||||
return post("/api/connection/close-database", { connectionId, database });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user