mchades commented on code in PR #12900:
URL: https://github.com/apache/gravitino/pull/12900#discussion_r4255305603


##########
web-v2/web/src/lib/store/metalakes/index.js:
##########
@@ -327,10 +347,16 @@ export const setIntoTreeNodeWithFetch = createAsyncThunk(
           ? getViewsApi({ metalake, catalog, schema }, { errorMessageMode: 
'none' })
           : Promise.resolve(null)
 
-      const [funcResult, entityResult, viewResult, childSchemasResult] = await 
Promise.allSettled([
+      const semanticModelsPromise =
+        type === 'relational'
+          ? getSemanticModelsApi({ metalake, catalog, schema }, { 
errorMessageMode: 'none' })

Review Comment:
   [P2] Avoid canceling the schema's Semantic Model list request
   
   On a direct load of a schema page, `CatalogsListPage` dispatches 
`fetchSemanticModels` while the tree expands the same schema. This second GET 
uses the same method/URL cancellation key, so it can cancel the list thunk. The 
tree's fulfilled handler only updates the tree and `tableData`, never 
`state.semanticModels`, leaving the Semantic Models tab showing `No data` even 
though the tree shows the models. I reproduced this against the real server on 
this head with an 800 ms delay on the first list response: the list thunk 
rejected with `CanceledError`, the tree load succeeded, and the tab stayed 
empty. Please share the request, disable cancellation between these independent 
consumers, or also synchronize the current schema's model list from the 
successful tree response.



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

Reply via email to