jtjenkins commented on code in PR #39894:
URL: https://github.com/apache/superset/pull/39894#discussion_r3475585715
##########
superset-frontend/src/dashboard/actions/datasources.ts:
##########
@@ -61,8 +63,21 @@ export function fetchDatasourceMetadata(key: string) {
return dispatch(setDatasource(datasource, key));
}
+ if (inFlightDatasourceKeys.has(key)) {
+ return undefined;
Review Comment:
Fixed in 9130ab39cb. Replaced the `Set` guard with a per-key `Map<string,
Promise>` of in-flight requests and return the same promise to every concurrent
caller, so completion and rejection propagate consistently (the
`Promise.all([addChart, fetchDatasourceMetadata])` in `addSliceToDashboard` now
actually awaits the metadata and observes errors). Cleanup moved to `.finally`.
Added tests asserting concurrent callers share one promise and that a rejection
reaches all awaiters.
--
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]