You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: in-flight query table is keyed by thread id alone #901
The executor tracks running statements in in_flight: DashMap<u64, (String, Route)> (src-tauri/crates/mas-core/src/query/executor.rs), keyed only by the server's thread id. Thread ids are unique per server, not across servers. Two open connections, to two different servers, can both have thread N running at once:
The second insert overwrites the first, so cancelling the first connection misses its statement.
InFlightGuard::drop removes by thread id regardless of connection, so one statement finishing can deregister another server's running statement. Cancel then can't reach that one either.
The ticket added in #900 checks the connection id and route before it removes its own entry. The executor's own guard and the insert collision are unchanged.
Fix
Key the table by (connection_id, thread_id). Then update threads_to_cancel, InFlightGuard::drop and the tracker to match. Add a unit test: two connections register the same thread id, and cancelling one leaves the other registered.
Activity