Kunal8954 opened a new pull request, #43808:
URL: https://github.com/apache/superset/pull/43808

   ## Summary
   Fixes #43764 — bulk dataset imports (e.g. 293 datasets) time out on the 
gunicorn worker.
   
   ## Root cause
   For every dataset being imported, `Database.has_table()` was called 
unconditionally. This opens a live connection to the *target* database and runs 
a schema-introspection query — a real network round trip. Its result was only 
ever used to decide whether to call `load_data()`, which is itself a no-op 
unless the dataset's config carries an inline `data` URI (uncommon — most bulk 
metadata imports don't). So for a typical bulk import of dataset definitions, 
every single dataset paid for one wasted database round trip.
   
   ## Fix
   Only call `has_table()` when `data_uri` is actually present, since that's 
the only case where its result is ever used.
   
   ## Testing
   Added two unit tests: one asserting `has_table` is *not* called when there's 
no data URI, one asserting it *is* called when there is one.


-- 
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]

Reply via email to