-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rerunning query results in infinite load #93
Comments
Checking 👀 |
Hey @pooriaPoorsarvi It appears that addDataToMap in Kepler library sometimes fails with such error Issue is partially addressed by |
|
@delfrrr Thanks! is the dependency update also deployed on the master branch (or for the Kepler.gl fork made by the dekart team)? |
In dekart uses already fork of Kepler with few bugfixes https://github.com/dekart-xyz/kepler.gl/pkgs/npm/kepler.gl |
@delfrrr I see; thanks for the update! We do have a possible workaround that we are using in our fork of dekart. From what I observed, this error only happens on updating the data (so using addDataToMap for an existing dataset id), so the workaround, is to remove the dataset before adding in the updated version. This could cause a bug which is, the visualization being reverted back to default on rerunning a query, but a simple fix for that is to save the visState of Kepler.gl before running the query, and then retrieving the layer, and the filters related to that dataset id, after we have removed it and then adding it back before adding back the new data. |
@pooriaPoorsarvi can you please share code of your workaround? |
@delfrrr Sure, it's a work in progress that I'm gonna change soon (for example instead of storing things in local storage you could use redux, and there are some other information that needs to be updated) but here is the gist of it: before the query starts running we save the current state of kepler.gl : https://github.com/pooriaPoorsarvi/dekart/blob/c95c9a7539acf228f13ca02708f65cd531d7d761/src/client/Query.js#L206 We can't rely on the existing system because that is made for when the user saves the report, and that saves it to the backend. But we need to have a consistent view even if the user reruns a query after a minor change (without saving it). Then once a query has ran, if a dataset layer already exists for it within Kepler, we remove it, and readd the new data, but we use the information we saved from the previous step to make it look like it has the same visual state: https://github.com/pooriaPoorsarvi/dekart/blob/custom-authorization/src/client/actions/dataset.js#L93:~:text=id)%3B-,dispatch(keplerRemove(dataset.id)),%7D,-await%20dispatch( |
@pooriaPoorsarvi so I tried to fix kepler.gl, but I after fix in one place I receive error in the other place; It does not seam update flow works well in kepler.gl 😐 I use my variation of your fix logic: save config, remove dataset and add it again |
@pooriaPoorsarvi fix is available in 0.12.2-rc.0 |
@delfrrr Thank you! will merge it soon with our own code! |
Is this a new bug in Dekart?
Current Behavior
When you rerun dekart with a new query on the same query tab, it can result in infinite load time for data. On reload of the page, new data is shown, however.
Expected Behavior
The new data should be shown after a finite period of time on the screen (Downloading Map Data step should be finished on the front end. This is likely because the front end is not getting the status update from the backend in a correct manner).
Steps To Reproduce
Go to dekart instance (i.e. playground)
run :
Then run :
On the same query tab. It should get stuck on
Downloading Map Data
step.Even on the playground, this issue can be reproduced.
However, if you run a query that has been saved before, this does not seem to happen.
Relevant log output
Environment
Which database adapter are you using with dekart?
BigQuery
Additional Context
No response
The text was updated successfully, but these errors were encountered: