Revert "fix: slow responses on schema cache reload"

This reverts commit 727ef465c1.

Also documents requests waiting for the schema cache.
This commit is contained in:
steve-chavez
2024-04-02 23:15:09 -05:00
committed by Steve Chavez
parent d7c64a93f8
commit 3d55f77bae
4 changed files with 5 additions and 29 deletions
+1 -3
View File
@@ -320,12 +320,10 @@ loadSchemaCache appState observer = do
return SCOnRetry
Right sCache -> do
putSchemaCache appState $ Just sCache
observer $ SchemaCacheQueriedObs resultTime
(t, _) <- timeItT $ observer $ SchemaCacheSummaryObs sCache
observer $ SchemaCacheLoadedObs t
-- it's important to update AppState schema cache only once it has been fully evaluated before (this will be done by the observer above)
-- otherwise requests will wait for the schema cache to be loaded
putSchemaCache appState $ Just sCache
putSchemaCacheLoaded appState True
return SCLoaded