LisaHusband opened a new pull request, #33857: URL: https://github.com/apache/superset/pull/33857
fix(dashboard): load charts correctly ### SUMMARY This PR fixes a concurrency-related bug in the `/api/v1/dataset` endpoint where parallel requests using Rison-encoded filters could return incorrect results. Previously, the `self._filters` instance was reused across requests in `ModelRestApi`, leading to race conditions and cross-request contamination of filter state. This caused dataset queries with `table_name` filters to occasionally return incorrect datasets (e.g., a virtual dataset with a similar name). The fix replaces the shared filter instance with a request-local `Filters()` object, ensuring thread and coroutine safety. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF _Not applicable — API-only change._ ### TESTING INSTRUCTIONS 1. Register multiple datasets in Superset with similar or overlapping names. 2. Send multiple concurrent requests to `/api/v1/dataset?q=(filters:!((col:table_name,opr:eq,value:<name>)))`. 3. Confirm that each request returns exactly one dataset with the correct `table_name`. 4. Confirm behavior under both sequential and concurrent conditions. ### ADDITIONAL INFORMATION - [x] Has associated issue: Fixes #33828 - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
